Class RecordObjectDefinition<T extends graphql.language.TypeDefinition<T>,U extends GenerationField>
java.lang.Object
no.sikt.graphitron.definitions.objects.AbstractObjectDefinition<T,U>
no.sikt.graphitron.definitions.objects.RecordObjectDefinition<T,U>
- All Implemented Interfaces:
GenerationTarget,ObjectSpecification<U>,RecordObjectSpecification<U>
- Direct Known Subclasses:
InputDefinition,ObjectDefinition,UnionDefinition
public abstract class RecordObjectDefinition<T extends graphql.language.TypeDefinition<T>,U extends GenerationField>
extends AbstractObjectDefinition<T,U>
implements RecordObjectSpecification<U>
A generalized implementation of
ObjectSpecification for types that can be linked to tables or records.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionno.sikt.graphitron.javapoet.ClassNameasSourceClassName(boolean toRecord) no.sikt.graphitron.javapoet.ClassNameasTargetClassName(boolean toRecord) booleanbooleanno.sikt.graphql.federation.fieldsets.FederationFieldSetno.sikt.graphitron.javapoet.ClassNameClass<?> protected LinkedHashSet<String> getTable()booleanbooleanbooleanbooleanhasTable()booleanisEntity()booleanDoes this have theGenerationDirective.NOT_GENERATEDdirective for skipping generation set?booleanbooleanprotected booleanisNonNullable(GenerationField field) Methods inherited from class no.sikt.graphitron.definitions.objects.AbstractObjectDefinition
createFields, equals, getClassReference, getFieldByName, getFields, getGraphClassName, getName, getObjectDefinition, hasField, hashCodeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface no.sikt.graphitron.definitions.interfaces.ObjectSpecification
getClassReference, getFieldByName, getFields, getGraphClassName, getName, isOperationRoot
-
Constructor Details
-
RecordObjectDefinition
-
-
Method Details
-
isNonNullable
- Returns:
- Is this field non-nullable in the database?
-
createsDataFetcher
public boolean createsDataFetcher()- Specified by:
createsDataFetcherin interfaceGenerationTarget- Returns:
- Does this element lead to the generation of additional data fetchers?
-
createsDataFetchersForFields
public boolean createsDataFetchersForFields()- Specified by:
createsDataFetchersForFieldsin interfaceGenerationTarget- Returns:
- Does this element contain fields which may produce data fetchers?
-
isGenerated
public boolean isGenerated()- Specified by:
isGeneratedin interfaceGenerationTarget- Returns:
- Should this object be generated?
-
isGeneratedWithResolver
public boolean isGeneratedWithResolver()- Specified by:
isGeneratedWithResolverin interfaceGenerationTarget- Returns:
- Should this object be generated as or containing resolvers?
-
isExplicitlyNotGenerated
public boolean isExplicitlyNotGenerated()Description copied from interface:GenerationTargetDoes this have theGenerationDirective.NOT_GENERATEDdirective for skipping generation set?- Specified by:
isExplicitlyNotGeneratedin interfaceGenerationTarget
-
getTable
- Specified by:
getTablein interfaceRecordObjectSpecification<T extends graphql.language.TypeDefinition<T>>- Returns:
- Table objects which holds table names.
-
hasTable
public boolean hasTable()- Specified by:
hasTablein interfaceRecordObjectSpecification<T extends graphql.language.TypeDefinition<T>>- Returns:
- Does this object have the "
table" directive which implies a connection to a database table?
-
getRecordReference
- Specified by:
getRecordReferencein interfaceRecordObjectSpecification<T extends graphql.language.TypeDefinition<T>>- Returns:
- The reference for a record class for this input type.
-
getRecordReferenceName
- Specified by:
getRecordReferenceNamein interfaceRecordObjectSpecification<T extends graphql.language.TypeDefinition<T>>- Returns:
- The reference name for a record class for this input type.
-
getRecordClassName
public no.sikt.graphitron.javapoet.ClassName getRecordClassName()- Specified by:
getRecordClassNamein interfaceRecordObjectSpecification<T extends graphql.language.TypeDefinition<T>>- Returns:
- The
ClassNamefor the record that corresponds to this type.
-
hasJavaRecordReference
public boolean hasJavaRecordReference()- Specified by:
hasJavaRecordReferencein interfaceRecordObjectSpecification<T extends graphql.language.TypeDefinition<T>>- Returns:
- Does this input type have a record java class attached?
-
hasRecordReference
public boolean hasRecordReference()- Specified by:
hasRecordReferencein interfaceRecordObjectSpecification<T extends graphql.language.TypeDefinition<T>>- Returns:
- Does this input type have a record class attached?
-
asSourceClassName
public no.sikt.graphitron.javapoet.ClassName asSourceClassName(boolean toRecord) - Specified by:
asSourceClassNamein interfaceRecordObjectSpecification<T extends graphql.language.TypeDefinition<T>>- Returns:
- The
ClassNamefor this object when it is considered the source of a mapping.
-
asTargetClassName
public no.sikt.graphitron.javapoet.ClassName asTargetClassName(boolean toRecord) - Specified by:
asTargetClassNamein interfaceRecordObjectSpecification<T extends graphql.language.TypeDefinition<T>>- Returns:
- The
ClassNamefor this object when it is considered the target of a mapping.
-
asRecordName
- Specified by:
asRecordNamein interfaceRecordObjectSpecification<T extends graphql.language.TypeDefinition<T>>- Returns:
- The name of this object once it is transformed into a record.
-
getInputsSortedByNullability
- Returns:
- List of input fields contained within this input type, sorted by whether they are nullable fields.
-
getRequiredInputs
-
isEntity
public boolean isEntity()- Specified by:
isEntityin interfaceRecordObjectSpecification<T extends graphql.language.TypeDefinition<T>>- Returns:
- Is this type an entity according to the Apollo Federation specification?
-
getEntityKeys
public no.sikt.graphql.federation.fieldsets.FederationFieldSet getEntityKeys()- Specified by:
getEntityKeysin interfaceRecordObjectSpecification<T extends graphql.language.TypeDefinition<T>>- Returns:
- Apollo federation entity keys for this type.
-
hasNodeDirective
public boolean hasNodeDirective()- Specified by:
hasNodeDirectivein interfaceRecordObjectSpecification<T extends graphql.language.TypeDefinition<T>>
-
getNodeConfiguration
- Specified by:
getNodeConfigurationin interfaceRecordObjectSpecification<T extends graphql.language.TypeDefinition<T>>
-