Class InterfaceDefinition
java.lang.Object
no.sikt.graphitron.definitions.objects.AbstractObjectDefinition<graphql.language.InterfaceTypeDefinition,ObjectField>
no.sikt.graphitron.definitions.objects.InterfaceDefinition
- All Implemented Interfaces:
GenerationTarget,ObjectSpecification<ObjectField>,RecordObjectSpecification<ObjectField>,TypeResolverTarget
public class InterfaceDefinition
extends AbstractObjectDefinition<graphql.language.InterfaceTypeDefinition,ObjectField>
implements TypeResolverTarget, RecordObjectSpecification<ObjectField>
Represents a GraphQL interface.
-
Constructor Summary
ConstructorsConstructorDescriptionInterfaceDefinition(graphql.language.InterfaceTypeDefinition typeDefinition) -
Method Summary
Modifier and TypeMethodDescriptionno.sikt.graphitron.javapoet.ClassNameasSourceClassName(boolean toRecord) no.sikt.graphitron.javapoet.ClassNameasTargetClassName(boolean toRecord) protected List<ObjectField> createFields(graphql.language.InterfaceTypeDefinition objectDefinition) no.sikt.graphql.federation.fieldsets.FederationFieldSetno.sikt.graphitron.javapoet.ClassNameClass<?> getTable()booleanbooleanbooleanbooleanhasTable()booleanisEntity()booleanDoes this have theGenerationDirective.NOT_GENERATEDdirective for skipping generation set?booleanbooleanbooleanMethods inherited from class no.sikt.graphitron.definitions.objects.AbstractObjectDefinition
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.GenerationTarget
createsDataFetcher, createsDataFetchersForFieldsMethods inherited from interface no.sikt.graphitron.definitions.interfaces.ObjectSpecification
getClassReference, getFieldByName, getFields, getGraphClassName, getName, isOperationRootMethods inherited from interface no.sikt.graphitron.definitions.interfaces.RecordObjectSpecification
getNodeConfiguration, hasNodeDirective
-
Constructor Details
-
InterfaceDefinition
public InterfaceDefinition(graphql.language.InterfaceTypeDefinition typeDefinition)
-
-
Method Details
-
createFields
- Specified by:
createFieldsin classAbstractObjectDefinition<graphql.language.InterfaceTypeDefinition,ObjectField>
-
hasTable
public boolean hasTable()- Specified by:
hasTablein interfaceRecordObjectSpecification<ObjectField>- Returns:
- Does this object have the "
table" directive which implies a connection to a database table?
-
isMultiTableInterface
public boolean isMultiTableInterface() -
getTable
- Specified by:
getTablein interfaceRecordObjectSpecification<ObjectField>- Returns:
- Table objects which holds table names.
-
hasDiscriminator
public boolean hasDiscriminator() -
getDiscriminatorFieldName
-
getRecordReference
- Specified by:
getRecordReferencein interfaceRecordObjectSpecification<ObjectField>- Returns:
- The reference for a record class for this input type.
-
getRecordReferenceName
- Specified by:
getRecordReferenceNamein interfaceRecordObjectSpecification<ObjectField>- Returns:
- The reference name for a record class for this input type.
-
getRecordClassName
public no.sikt.graphitron.javapoet.ClassName getRecordClassName()- Specified by:
getRecordClassNamein interfaceRecordObjectSpecification<ObjectField>- Returns:
- The
ClassNamefor the record that corresponds to this type.
-
hasJavaRecordReference
public boolean hasJavaRecordReference()- Specified by:
hasJavaRecordReferencein interfaceRecordObjectSpecification<ObjectField>- Returns:
- Does this input type have a record java class attached?
-
hasRecordReference
public boolean hasRecordReference()- Specified by:
hasRecordReferencein interfaceRecordObjectSpecification<ObjectField>- Returns:
- Does this input type have a record class attached?
-
asSourceClassName
public no.sikt.graphitron.javapoet.ClassName asSourceClassName(boolean toRecord) - Specified by:
asSourceClassNamein interfaceRecordObjectSpecification<ObjectField>- 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<ObjectField>- Returns:
- The
ClassNamefor this object when it is considered the target of a mapping.
-
asRecordName
- Specified by:
asRecordNamein interfaceRecordObjectSpecification<ObjectField>- Returns:
- The name of this object once it is transformed into a record.
-
isEntity
public boolean isEntity()- Specified by:
isEntityin interfaceRecordObjectSpecification<ObjectField>- 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<ObjectField>- Returns:
- Apollo federation entity keys for this type.
-
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
-