Class FetchCountDBMethodGenerator
java.lang.Object
no.sikt.graphitron.generators.abstractions.AbstractSchemaMethodGenerator<T,ObjectDefinition>
no.sikt.graphitron.generators.abstractions.DBMethodGenerator<ObjectField>
no.sikt.graphitron.generators.db.fetch.FetchDBMethodGenerator
no.sikt.graphitron.generators.db.fetch.FetchCountDBMethodGenerator
- All Implemented Interfaces:
MethodGenerator
Generator that creates methods for counting all available elements for a type.
-
Field Summary
FieldsFields inherited from class no.sikt.graphitron.generators.db.fetch.FetchDBMethodGenerator
idParamName, isRootFields inherited from class no.sikt.graphitron.generators.abstractions.AbstractSchemaMethodGenerator
dependencyMap, localObject, processedSchema -
Constructor Summary
ConstructorsConstructorDescriptionFetchCountDBMethodGenerator(ObjectDefinition localObject, ProcessedSchema processedSchema) -
Method Summary
Methods inherited from class no.sikt.graphitron.generators.db.fetch.FetchDBMethodGenerator
createAliasDeclarations, createMapping, createSeekAndLimitBlock, createSelectConditions, createSelectJoins, formatWhereContents, generateCorrelatedSubquery, generateForScalarField, generateForUnionField, generateSelectRow, getInputConditions, getSelectCodeAndFieldSource, getSpecBuilder, inferFieldNamingConvention, maybeCreateOrderFieldsBlock, maybeCreateOrderFieldsDeclarationBlock, wrapInFieldMethods inherited from class no.sikt.graphitron.generators.abstractions.DBMethodGenerator
getDefaultSpecBuilder, iterableWrapTypeMethods inherited from class no.sikt.graphitron.generators.abstractions.AbstractSchemaMethodGenerator
getDataFetcherWiring, getDependencyMap, getLocalObject, getLocalTable, getTypeResolverWiring, inferFieldTypeName
-
Field Details
-
UNION_COUNT_QUERY
- See Also:
-
COUNT_FIELD_NAME
- See Also:
-
-
Constructor Details
-
FetchCountDBMethodGenerator
-
-
Method Details
-
generate
- Specified by:
generatein classAbstractSchemaMethodGenerator<ObjectField,ObjectDefinition> - Parameters:
target- AObjectFieldfor which a method should be generated for. This must reference an object with the "table" directive set.- Returns:
- The complete javapoet
MethodSpecbased on the provided reference field.
-
generateAll
- Returns:
- List of complete javapoet
MethodSpecthat can be generated for this object.
-