Class DataFetcherMethodGenerator

All Implemented Interfaces:
MethodGenerator
Direct Known Subclasses:
FetchEntitiesMethodGenerator, FetchNodeMethodGenerator, OperationMethodGenerator

public abstract class DataFetcherMethodGenerator extends AbstractSchemaMethodGenerator<ObjectField,ObjectDefinition>
  • Field Details

  • Constructor Details

  • Method Details

    • getDefaultSpecBuilder

      public no.sikt.graphitron.javapoet.MethodSpec.Builder getDefaultSpecBuilder(String methodName, no.sikt.graphitron.javapoet.TypeName returnType)
      Overrides:
      getDefaultSpecBuilder in class AbstractSchemaMethodGenerator<ObjectField,ObjectDefinition>
      Parameters:
      methodName - The name of the method.
      returnType - The return type of the method, as a javapoet TypeName.
      Returns:
      The default builder for this class' methods, with any common settings applied.
    • extractParams

      protected no.sikt.graphitron.javapoet.CodeBlock extractParams(ObjectField target)
    • declarePageSize

      public static no.sikt.graphitron.javapoet.CodeBlock declarePageSize(int defaultFirst)
      Returns:
      CodeBlock consisting of a declaration of the page size variable through a method call.
    • transformDTOBlock

      protected no.sikt.graphitron.javapoet.CodeBlock transformDTOBlock(GenerationField field, no.sikt.graphitron.javapoet.CodeBlock source)
    • getDataFetcherWiring

      public List<WiringContainer> getDataFetcherWiring()
      Overrides:
      getDataFetcherWiring in class AbstractSchemaMethodGenerator<ObjectField,ObjectDefinition>
      Returns:
      Any DataFetcher wiring this generator produces.