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 TypeMethodDescriptionasSourceClassName(boolean toRecord) asTargetClassName(boolean toRecord) protected List<ObjectField>createFields(graphql.language.InterfaceTypeDefinition objectDefinition) Class<?>getTable()booleanbooleanbooleanbooleanbooleanbooleanhasTable()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, hashCode, isOperationRootMethods 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
-
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
- 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
- Specified by:
asSourceClassNamein interfaceRecordObjectSpecification<ObjectField>- Returns:
- The
ClassNamefor this object when it is considered the source of a mapping.
-
asTargetClassName
- 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
- 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
-
hasNodeDirective
public boolean hasNodeDirective()- Specified by:
hasNodeDirectivein interfaceRecordObjectSpecification<ObjectField>
-
getTypeId
- Specified by:
getTypeIdin interfaceRecordObjectSpecification<ObjectField>
-
hasCustomKeyColumns
public boolean hasCustomKeyColumns()- Specified by:
hasCustomKeyColumnsin interfaceRecordObjectSpecification<ObjectField>
-
getKeyColumns
- Specified by:
getKeyColumnsin interfaceRecordObjectSpecification<ObjectField>
-