Class AbstractGraphQLOptions
java.lang.Object
org.brapi.schematools.core.options.AbstractGeneratorSubOptions
org.brapi.schematools.core.graphql.options.AbstractGraphQLOptions
- All Implemented Interfaces:
Options,Validatable
- Direct Known Subclasses:
AbstractGraphQLQueryOptions,CreateMutationOptions,DeleteMutationOptions,SingleQueryOptions,UpdateMutationOptions
Provides general options for the generation of Endpoints
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal StringgetNameFor(@NonNull String name) Gets the name of the query or mutation for a specific primary modelfinal StringgetNameFor(@NonNull BrAPIType type) Gets the name of query or mutation for a specific primary modelbooleanDetermines if the query or mutation should have a plurialised namevoidoverride(AbstractGraphQLOptions overrideOptions) Overrides the values in this Options Object from the provided Options Object if they are non-nullvalidate()Checks if the current options are valid, return a list of errors if the options are not validMethods inherited from class org.brapi.schematools.core.options.AbstractGeneratorSubOptions
getDescriptionFor, getDescriptionFor, isGenerating, isGeneratingFor, isGeneratingFor, override, setGenerateFor, setGenerateFor
-
Constructor Details
-
AbstractGraphQLOptions
public AbstractGraphQLOptions()
-
-
Method Details
-
validate
Description copied from class:AbstractGeneratorSubOptionsChecks if the current options are valid, return a list of errors if the options are not valid- Specified by:
validatein interfaceValidatable- Overrides:
validatein classAbstractGeneratorSubOptions- Returns:
- a Validation object than can be used queried to find if the options are valid and any errors if the options are not valid
-
override
Overrides the values in this Options Object from the provided Options Object if they are non-null- Parameters:
overrideOptions- the options which will be used to override this Options Object
-
getNameFor
Gets the name of the query or mutation for a specific primary model- Parameters:
name- the name of the primary model- Returns:
- the name of the query or mutation for a specific primary model
-
getNameFor
Gets the name of query or mutation for a specific primary model- Parameters:
type- the primary model- Returns:
- the name of the query or mutation for a specific primary model
-
isPluralisingName
public boolean isPluralisingName()Determines if the query or mutation should have a plurialised name- Returns:
trueif the query or mutation should have a plurialised name,falseotherwise
-