Class AbstractField<T extends graphql.language.NamedNode<T> & graphql.language.DirectivesContainer<T>>
java.lang.Object
no.sikt.graphitron.definitions.fields.AbstractField<T>
- All Implemented Interfaces:
FieldSpecification
- Direct Known Subclasses:
EnumField,GenerationSourceField,OrderByEnumField
public abstract class AbstractField<T extends graphql.language.NamedNode<T> & graphql.language.DirectivesContainer<T>>
extends Object
implements FieldSpecification
This class represents the general functionality associated with GraphQLs object fields.
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractField(T field, String container) AbstractField(T field, FieldType fieldType, String container) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface no.sikt.graphitron.definitions.interfaces.FieldSpecification
getNodeIdTypeName, hasNodeID
-
Constructor Details
-
AbstractField
-
AbstractField
-
-
Method Details
-
hasSetFieldOverride
public boolean hasSetFieldOverride()- Specified by:
hasSetFieldOverridein interfaceFieldSpecification- Returns:
- Does this field use the
GenerationDirective.FIELDdirective?
-
getTypeName
- Specified by:
getTypeNamein interfaceFieldSpecification- Returns:
- The name of the field's underlying data type.
-
getContainerTypeName
- Specified by:
getContainerTypeNamein interfaceFieldSpecification- Returns:
- The name of the field's container schema type.
-
isID
public boolean isID()- Specified by:
isIDin interfaceFieldSpecification- Returns:
- Is this field an ID?
-
isIterableWrapped
public boolean isIterableWrapped()- Specified by:
isIterableWrappedin interfaceFieldSpecification- Returns:
- Is this field wrapped in a list?
-
isNullable
public boolean isNullable()- Specified by:
isNullablein interfaceFieldSpecification- Returns:
- Is this field optional/nullable?
-
isNonNullable
public boolean isNonNullable()- Specified by:
isNonNullablein interfaceFieldSpecification- Returns:
- Is this field required/non-nullable?
-
getTypeClass
public no.sikt.graphitron.javapoet.TypeName getTypeClass()- Specified by:
getTypeClassin interfaceFieldSpecification- Returns:
TypeNamefor this field's type.
-
getName
- Specified by:
getNamein interfaceFieldSpecification- Returns:
- The name of the object as specified in the schema.
-
getJavaName
-
getUpperCaseName
- Specified by:
getUpperCaseNamein interfaceFieldSpecification- Returns:
- The database equivalent name of this field. Defaults to field name.
-
getUnprocessedFieldOverrideInput
-
getMappingFromSchemaName
- Specified by:
getMappingFromSchemaNamein interfaceFieldSpecification- Returns:
- Schema-side method name mappings based on the GraphQL equivalent of this field.
-
getMappingFromFieldOverride
- Specified by:
getMappingFromFieldOverridein interfaceFieldSpecification- Returns:
- DB-side method name mappings based on the database equivalent of this field.
-
isRootField
public boolean isRootField()- Specified by:
isRootFieldin interfaceFieldSpecification- Returns:
- Is this object field a Query or Mutation root field?
-