Class ObjectDefinition
java.lang.Object
no.sikt.graphitron.definitions.objects.AbstractObjectDefinition<T,U>
no.sikt.graphitron.definitions.objects.RecordObjectDefinition<graphql.language.ObjectTypeDefinition,ObjectField>
no.sikt.graphitron.definitions.objects.ObjectDefinition
- All Implemented Interfaces:
GenerationTarget,ObjectSpecification<ObjectField>,RecordObjectSpecification<ObjectField>
public class ObjectDefinition
extends RecordObjectDefinition<graphql.language.ObjectTypeDefinition,ObjectField>
Represents the default GraphQL object.
Objects which do not fall within a different object category will become instances of this class.
This is typically the only object type used in table referencing and joining operations.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected List<ObjectField>createFields(graphql.language.ObjectTypeDefinition objectDefinition) graphql.language.ObjectTypeDefinitionbooleanbooleanimplementsInterface(String interfaceName) booleanbooleanstatic List<ObjectDefinition>processObjectDefinitions(List<graphql.language.ObjectTypeDefinition> objects) Creates instances of this class for each of theObjectTypeDefinitionprovided.Methods inherited from class no.sikt.graphitron.definitions.objects.RecordObjectDefinition
asRecordName, asSourceClassName, asTargetClassName, getEntityKeys, getInputsSortedByNullability, getKeyColumns, getRecordClassName, getRecordReference, getRecordReferenceName, getRequiredInputs, getTable, getTypeId, hasCustomKeyColumns, hasJavaRecordReference, hasNodeDirective, hasRecordReference, hasTable, isEntity, isExplicitlyNotGenerated, isGenerated, isNonNullableMethods 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.ObjectSpecification
getClassReference, getFieldByName, getFields, getGraphClassName, getName
-
Constructor Details
-
ObjectDefinition
public ObjectDefinition(graphql.language.ObjectTypeDefinition objectDefinition)
-
-
Method Details
-
createFields
- Specified by:
createFieldsin classAbstractObjectDefinition<graphql.language.ObjectTypeDefinition,ObjectField>
-
isOperationRoot
public boolean isOperationRoot()- Specified by:
isOperationRootin interfaceObjectSpecification<ObjectField>- Overrides:
isOperationRootin classAbstractObjectDefinition<graphql.language.ObjectTypeDefinition,ObjectField> - Returns:
- Is this object the top node? That should be either the Query or the Mutation type.
-
getTypeDefinition
public graphql.language.ObjectTypeDefinition getTypeDefinition()- Returns:
- The original interpretation of this object as provided by GraphQL.
-
isGeneratedWithResolver
public boolean isGeneratedWithResolver()- Specified by:
isGeneratedWithResolverin interfaceGenerationTarget- Overrides:
isGeneratedWithResolverin classRecordObjectDefinition<graphql.language.ObjectTypeDefinition,ObjectField> - Returns:
- Should this object be generated as or containing resolvers?
-
processObjectDefinitions
public static List<ObjectDefinition> processObjectDefinitions(List<graphql.language.ObjectTypeDefinition> objects) Creates instances of this class for each of theObjectTypeDefinitionprovided.- Returns:
- List of ObjectDefinitions.
-
implementsInterface
- Returns:
- Does this object implement this interface?
-
getImplementedInterfaces
-
getDiscriminator
-
hasDiscriminator
public boolean hasDiscriminator()
-