Class FieldImpl
java.lang.Object
com.graphql_java_generator.plugin.language.impl.FieldImpl
- All Implemented Interfaces:
Field
- Author:
- etienne-sf
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAnnotation(String annotationToAdd) The annotation setter should be added.voidaddAnnotation(String annotationToAdd, boolean replace) The annotation setter should be added.Retrieves the annotation or annotations to add to this field, when in server mode, to serve the relation that this field holdsConvert the given name, which is supposed to be in camel case (for instance: thisIsCamelCase) to a pascal case string (for instance: ThisIsCamelCase).getType()Retrieves theTypefor this fieldbooleanisId()Indicates whether this field is an id or not.voidsetAnnotation(String annotation) Deprecated.voidsetComments(List<graphql.language.Comment> comments) toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.graphql_java_generator.plugin.language.Field
getAppliedDirectives, getCamelCaseName, getComments, getDataFetcher, getDefaultValue, getDefaultValueAsText, getDescription, getFieldJavaFullClassnamesFromImplementedInterface, getFieldTypeAST, getGraphQLType, getGraphQLTypeSimpleName, getInputParameters, getJavaName, getJavaType, getJavaTypeFullClassname, getName, getOwningType, getRelation
-
Constructor Details
-
FieldImpl
public FieldImpl()
-
-
Method Details
-
getType
Description copied from interface:FieldRetrieves theTypefor this field -
getAnnotation
Description copied from interface:FieldRetrieves the annotation or annotations to add to this field, when in server mode, to serve the relation that this field holds- Specified by:
getAnnotationin interfaceField- Returns:
- The relevant annotation(s) ready to add directly as-is in the Velocity template, or "" (an empty string) if there is no annotation to add. The return is never null.
-
isId
public boolean isId()Description copied from interface:FieldIndicates whether this field is an id or not. It's used in server mode to add the jakarta.persistence annotations for the id fields. Default value is false. This field is set to true for GraphQL fields which are of 'ID' type. -
setAnnotation
Deprecated.The annotation setter should be used. Please use the {@link #addAnnotation(String))} instead- Parameters:
annotation- The annotation, that will replace the current one
-
addAnnotation
The annotation setter should be added. This method allows to properly manage indentation in the generated source code- Parameters:
annotationToAdd- The annotation, that will be added to the current one
-
addAnnotation
The annotation setter should be added. This method allows to properly manage indentation in the generated source code- Parameters:
annotationToAdd- The annotation, that will be added to the current onereplace- if true, any existing annotation is first removed
-
getPascalCaseName
Description copied from interface:FieldConvert the given name, which is supposed to be in camel case (for instance: thisIsCamelCase) to a pascal case string (for instance: ThisIsCamelCase).- Specified by:
getPascalCaseNamein interfaceField- Returns:
-
setComments
-
toString
-