Package no.sikt.graphitron.generators.db
Class FetchSingleTableInterfaceDBMethodGenerator
java.lang.Object
no.sikt.graphitron.generators.abstractions.AbstractSchemaMethodGenerator<ObjectField,ObjectDefinition>
no.sikt.graphitron.generators.abstractions.DBMethodGenerator<ObjectField>
no.sikt.graphitron.generators.db.FetchDBMethodGenerator
no.sikt.graphitron.generators.db.FetchSingleTableInterfaceDBMethodGenerator
- All Implemented Interfaces:
MethodGenerator
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class no.sikt.graphitron.generators.db.FetchDBMethodGenerator
conditionsShouldFallbackToFalse, ELEMENT_NAME, resolverKeyParamNameFields inherited from class no.sikt.graphitron.generators.abstractions.AbstractSchemaMethodGenerator
dependencyMap, localObject, processedSchema -
Constructor Summary
ConstructorsConstructorDescriptionFetchSingleTableInterfaceDBMethodGenerator(ObjectDefinition localObject, ProcessedSchema processedSchema) -
Method Summary
Modifier and TypeMethodDescriptionno.sikt.graphitron.javapoet.MethodSpecgenerate(ObjectField target) List<no.sikt.graphitron.javapoet.MethodSpec> protected no.sikt.graphitron.javapoet.CodeBlockgenerateSelectRow(FetchContext context, ObjectField target, List<ObjectDefinition> implementations, HashMap<String, Set<String>> overriddenFields) protected no.sikt.graphitron.javapoet.CodeBlockgetHelperMethodCallForNestedField(ObjectField field, FetchContext context) Generates a helper method call for nested record type fields.Methods inherited from class no.sikt.graphitron.generators.db.FetchDBMethodGenerator
createAliasDeclarations, createAliasDeclarations, createOrderFieldsBlock, createOrderFieldsDeclarationBlock, createSeekAndLimitBlock, createSelectConditions, createSelectJoins, createSelectJoins, formatJooqConditions, formatWhereContents, generateCorrelatedSubquery, generateForField, generateForField, generateForUnionField, generateHelperMethodName, generateNestedMethodName, generateSelectRow, getInitialKey, getInputConditions, getReturnType, getSelectCode, getSpecBuilder, inferFieldNamingConvention, isRoot, wrapInField, wrapInMultisetMethods inherited from class no.sikt.graphitron.generators.abstractions.DBMethodGenerator
getDefaultSpecBuilder, getDefaultSpecBuilderMethods inherited from class no.sikt.graphitron.generators.abstractions.AbstractSchemaMethodGenerator
createServiceDependency, declareAllServiceClasses, declareAllServiceClasses, declareAllServiceClassesInAliasSet, getDataFetcherWiring, getDependencyMap, getLocalObject, getLocalTable, getTypeResolverWiring
-
Field Details
-
DISCRIMINATOR
-
DISCRIMINATOR_VALUE
-
TOKEN
-
DATA
-
INNER_DATA
-
-
Constructor Details
-
FetchSingleTableInterfaceDBMethodGenerator
public FetchSingleTableInterfaceDBMethodGenerator(ObjectDefinition localObject, ProcessedSchema processedSchema)
-
-
Method Details
-
generate
- Specified by:
generatein classAbstractSchemaMethodGenerator<ObjectField,ObjectDefinition> - Returns:
- The complete javapoet
MethodSpecbased on the provided target.
-
getHelperMethodCallForNestedField
protected no.sikt.graphitron.javapoet.CodeBlock getHelperMethodCallForNestedField(ObjectField field, FetchContext context) Description copied from class:FetchDBMethodGeneratorGenerates a helper method call for nested record type fields. This base implementation generates the root-level helper method call.- Overrides:
getHelperMethodCallForNestedFieldin classFetchDBMethodGenerator- Parameters:
field- The field to generate the helper method call forcontext- The fetch context (unused in base implementation)- Returns:
- CodeBlock containing the helper method call, or null to use inline generation
-
generateSelectRow
protected no.sikt.graphitron.javapoet.CodeBlock generateSelectRow(FetchContext context, ObjectField target, List<ObjectDefinition> implementations, HashMap<String, Set<String>> overriddenFields) -
generateAll
- Returns:
- List of complete javapoet
MethodSpecthat can be generated for this object.
-