Package no.sikt.graphitron.generators.db
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.FetchDBMethodGenerator
no.sikt.graphitron.generators.db.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.FetchDBMethodGenerator
isRoot, resolverKeyParamNameFields 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.FetchDBMethodGenerator
createAliasDeclarations, createAliasDeclarations, createMapping, createOrderFieldsBlock, createOrderFieldsDeclarationBlock, createSeekAndLimitBlock, createSelectConditions, createSelectJoins, formatWhereContents, generateCorrelatedSubquery, generateForScalarField, generateForScalarField, generateForUnionField, generateSelectRow, getInitialKey, getInputConditions, getSelectCodeAndFieldSource, getSpecBuilder, inferFieldNamingConvention, wrapInField, wrapInMultisetMethods inherited from class no.sikt.graphitron.generators.abstractions.DBMethodGenerator
getContextParameters, getDefaultSpecBuilder, getMethodParameters, getMethodParametersWithOrderField, 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.
-