Class AbstractGraphQLQueryOptions
java.lang.Object
org.brapi.schematools.core.options.AbstractGeneratorSubOptions
org.brapi.schematools.core.graphql.options.AbstractGraphQLOptions
org.brapi.schematools.core.graphql.options.AbstractGraphQLQueryOptions
- All Implemented Interfaces:
Options,Validatable
- Direct Known Subclasses:
ListQueryOptions,SearchQueryOptions
Abstract base class for all GraphQL Options
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal StringgetResponseTypeNameForQuery(@NonNull String queryName) Gets the response type name of the query for a specific primary modelfinal StringgetResponseTypeNameForType(@NonNull String typeName) Gets the response type name for a specific primary modelfinal booleanhasInputFor(@NonNull String name) Determines if the Query accepts an input object for a specific primary modelfinal booleanhasInputFor(@NonNull BrAPIType type) Determines if the Query accepts an input object for a specific primary modelvoidoverride(AbstractGraphQLQueryOptions overrideOptions) Overrides the values in this Options Object from the provided Options Object if they are non-nullsetInputFor(String name, boolean hasInput) Sets if the Query accepts an input object for a specific primary modelvalidate()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.graphql.options.AbstractGraphQLOptions
getNameFor, getNameFor, isPluralisingName, overrideMethods inherited from class org.brapi.schematools.core.options.AbstractGeneratorSubOptions
getDescriptionFor, getDescriptionFor, isGenerating, isGeneratingFor, isGeneratingFor, override, setGenerateFor, setGenerateForMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.brapi.schematools.core.options.Options
getSchemaToolsVersion
-
Constructor Details
-
AbstractGraphQLQueryOptions
public AbstractGraphQLQueryOptions()
-
-
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 classAbstractGraphQLOptions- 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
-
getResponseTypeNameForType
Gets the response type name for a specific primary model- Parameters:
typeName- the name of the query- Returns:
- the response type name for a specific primary model
-
getResponseTypeNameForQuery
Gets the response type name of the query for a specific primary model- Parameters:
queryName- the name of the query- Returns:
- the response type name of the query for a specific primary model
-
hasInputFor
Determines if the Query accepts an input object for a specific primary model- Parameters:
name- the name of the primary model- Returns:
trueif the Query accepts an input object for a specific primary model,falseotherwise
-
hasInputFor
Determines if the Query accepts an input object for a specific primary model- Parameters:
type- the primary model- Returns:
trueif the Query accepts an input object for a specific primary model,falseotherwise
-
setInputFor
Sets if the Query accepts an input object for a specific primary model- Parameters:
name- the name of the primary modelhasInput-trueif the Query accepts an input object for a specific primary model,falseotherwise- Returns:
- the options for chaining
-