Class DecimalMinConstraint
- java.lang.Object
-
- graphql.validation.constraints.AbstractDirectiveConstraint
-
- graphql.validation.constraints.standard.DecimalMinConstraint
-
- All Implemented Interfaces:
DirectiveConstraint,ValidationRule
public class DecimalMinConstraint extends AbstractDirectiveConstraint
-
-
Constructor Summary
Constructors Constructor Description DecimalMinConstraint()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanappliesToListElements()protected booleanappliesToType(graphql.schema.GraphQLInputType inputType)A derived class will be called to indicate whether this input type applies to the constraintjava.util.List<graphql.schema.GraphQLScalarType>getApplicableTypes()DocumentationgetDocumentation()protected booleanisOK(boolean inclusive, int comparisonResult)protected java.util.List<graphql.GraphQLError>runConstraint(ValidationEnvironment validationEnvironment)This is called to perform the constraint validation-
Methods inherited from class graphql.validation.constraints.AbstractDirectiveConstraint
appliesTo, appliesTo, asBigDecimal, asBoolean, asMap, getBoolArg, getIntArg, getMessageTemplate, getMessageTemplate, getName, getStrArg, getStringOrIDOrObjectOrMapLength, isMap, isOneOfTheseTypes, isOneOfTheseTypes, isStringOrID, isStringOrIDOrList, isStringOrIDOrListOrMap, mkError, mkError, mkMessageParams, runValidation, toString
-
-
-
-
Method Detail
-
getDocumentation
public Documentation getDocumentation()
- Returns:
- documentation meta data about this constraint
-
isOK
protected boolean isOK(boolean inclusive, int comparisonResult)
-
getApplicableTypes
public java.util.List<graphql.schema.GraphQLScalarType> getApplicableTypes()
-
appliesToType
protected boolean appliesToType(graphql.schema.GraphQLInputType inputType)
Description copied from class:AbstractDirectiveConstraintA derived class will be called to indicate whether this input type applies to the constraint- Specified by:
appliesToTypein classAbstractDirectiveConstraint- Parameters:
inputType- the input type- Returns:
- true if the constraint can handle that type
-
runConstraint
protected java.util.List<graphql.GraphQLError> runConstraint(ValidationEnvironment validationEnvironment)
Description copied from class:AbstractDirectiveConstraintThis is called to perform the constraint validation- Specified by:
runConstraintin classAbstractDirectiveConstraint- Parameters:
validationEnvironment- the validation environment- Returns:
- a list of errors or an empty one if there are no errors
-
appliesToListElements
protected boolean appliesToListElements()
- Specified by:
appliesToListElementsin classAbstractDirectiveConstraint
-
-