Class ObjectField
java.lang.Object
no.sikt.graphitron.definitions.fields.AbstractField<T>
no.sikt.graphitron.definitions.fields.GenerationSourceField<graphql.language.FieldDefinition>
no.sikt.graphitron.definitions.fields.ObjectField
- All Implemented Interfaces:
FieldSpecification,GenerationField,GenerationTarget
- Direct Known Subclasses:
VirtualSourceField
Represents the default field type, which in addition to the generic field functionality also provides join operation data.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic List<ObjectField>getArgumentByName(String name) intintbooleanhasArgument(String name) booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanisInput()Methods inherited from class no.sikt.graphitron.definitions.fields.GenerationSourceField
getCondition, getContextFields, getFieldRecordMappingName, getFieldReferences, getMappingForRecordFieldOverride, getNodeIdTypeName, getService, hasCondition, hasFieldDirective, hasFieldReferences, hasNodeID, hasOverridingCondition, hasServiceReference, invokesSubquery, isExplicitlyNotGenerated, isExternalField, isGenerated, isGeneratedWithResolver, isResolverMethods inherited from class no.sikt.graphitron.definitions.fields.AbstractField
getContainerTypeName, getJavaName, getMappingFromFieldOverride, getMappingFromSchemaName, getName, getTypeClass, getTypeName, getUnprocessedFieldOverrideInput, getUpperCaseName, hasSetFieldOverride, isID, isIterableWrapped, isNonNullable, isNullable, isRootFieldMethods 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
getContainerTypeName, getMappingFromFieldOverride, getMappingFromSchemaName, getName, getTypeClass, getTypeName, getUpperCaseName, hasSetFieldOverride, isID, isIterableWrapped, isNonNullable, isNullable, isRootField
-
Field Details
-
RESERVED_PAGINATION_NAMES
-
-
Constructor Details
-
ObjectField
-
-
Method Details
-
isFetchByID
public boolean isFetchByID()- Returns:
- Should this field use IDs to fetch record data?
-
hasForwardPagination
public boolean hasForwardPagination()- Returns:
- Does this search field use forward pagination? Does its type have the reserved "Connection" suffix?
-
hasBackwardPagination
public boolean hasBackwardPagination()- Returns:
- Does this search field use backward pagination? Does its type have the reserved "Connection" suffix?
-
hasPagination
public boolean hasPagination()- Returns:
- Does this search field use any form of pagination?
-
hasMutationType
public boolean hasMutationType()- Specified by:
hasMutationTypein interfaceGenerationField- Overrides:
hasMutationTypein classGenerationSourceField<graphql.language.FieldDefinition>- Returns:
- Does this field have a mutation operation defined?
-
getMutationType
- Specified by:
getMutationTypein interfaceGenerationField- Overrides:
getMutationTypein classGenerationSourceField<graphql.language.FieldDefinition>- Returns:
- The type of mutation that should be applied in this operation.
-
getArguments
- Returns:
- List of all input arguments for this field.
-
getArgumentByName
- Returns:
- Argument with this name if it exists.
-
hasArgument
- Returns:
- Does this field contain this argument?
-
getFirstDefault
public int getFirstDefault()- Returns:
- Default value set for the after parameter.
-
getLastDefault
public int getLastDefault()- Returns:
- Default value set for the before parameter.
-
getNonReservedArguments
- Returns:
- List of all input non-reserved arguments for this field.
-
getNonReservedArgumentsWithOrderField
- Returns:
- List of all non-reserved and orderBy arguments for this field
-
hasInputFields
public boolean hasInputFields()- Returns:
- Does this field have any input fields defined?
-
hasNonReservedInputFields
public boolean hasNonReservedInputFields()- Returns:
- Does this field have any input fields defined that are not reserved?
-
hasRequiredPaginationFields
public boolean hasRequiredPaginationFields()- Returns:
- Does this field have any set of pagination fields?
-
from
public static List<ObjectField> from(List<graphql.language.FieldDefinition> fields, String container) - Returns:
- List of instances based on a list of
FieldDefinition.
-
hasLookupKey
public boolean hasLookupKey()- Returns:
- Does this field contain an argument set as a key for a lookup operation?
-
getLookupKeys
- Returns:
- Set of fields that are configured to be used as lookup keys.
-
getOrderField
-
isInput
public boolean isInput()
-