Class FixedPointPatternConstraint
java.lang.Object
org.kuali.rice.krad.datadictionary.DictionaryBeanBase
org.kuali.rice.krad.datadictionary.validation.constraint.BaseConstraint
org.kuali.rice.krad.datadictionary.validation.constraint.ValidCharactersConstraint
org.kuali.rice.krad.datadictionary.validation.constraint.ValidDataPatternConstraint
org.kuali.rice.krad.datadictionary.validation.constraint.FixedPointPatternConstraint
- All Implemented Interfaces:
Serializable,Cloneable,Copyable,DictionaryBean,Constraint
Validation pattern for matching fixed point numbers, optionally matching negative numbers
Only allows a numeric value where the precision property represents the maximum number of total numbers allowed, and scale represents the minimum numbers after the decimal point. The decimal places are implied to be 0 if not included and still count towards total numbers allowed.
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected intprotected intFields inherited from class org.kuali.rice.krad.datadictionary.validation.constraint.ValidCharactersConstraint
valueFields inherited from class org.kuali.rice.krad.datadictionary.validation.constraint.BaseConstraint
applyClientSide, constraintStateOverrides, messageComponentCode, messageKey, messageNamespaceCode, states, validationMessageParamsFields inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
componentCode, namespaceCode -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcompleteValidation(ValidationTrace tracer) Validates different requirements of component compiling a series of reports detailing information on errors found in the component.intprotected StringOverriding retrieval ofintgetScale()Parameters to be used in the string retrieved by this constraint's messageKey, ordered by number of the parambooleanvoidsetAllowNegative(boolean allowNegative) voidsetPrecision(int precision) voidsetScale(int scale) Methods inherited from class org.kuali.rice.krad.datadictionary.validation.constraint.ValidDataPatternConstraint
getValue, setValueMethods inherited from class org.kuali.rice.krad.datadictionary.validation.constraint.BaseConstraint
getApplyClientSide, getConstraintStateOverrides, getMessageComponentCode, getMessageKey, getMessageNamespaceCode, getStates, getValidationMessageParamsArray, setApplyClientSide, setConstraintStateOverrides, setMessageComponentCode, setMessageKey, setMessageNamespaceCode, setStates, setValidationMessageParamsMethods inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
clone, copy, dataDictionaryPostProcessing, getComponentCode, getNamespaceCode, setComponentCode, setNamespaceCode
-
Field Details
-
allowNegative
protected boolean allowNegative -
precision
protected int precision -
scale
protected int scale
-
-
Constructor Details
-
FixedPointPatternConstraint
public FixedPointPatternConstraint()
-
-
Method Details
-
getRegexString
Overriding retrieval of- Specified by:
getRegexStringin classValidDataPatternConstraint- Returns:
- regular expression
- See Also:
-
isAllowNegative
public boolean isAllowNegative()- Returns:
- the allowNegative
-
setAllowNegative
public void setAllowNegative(boolean allowNegative) - Parameters:
allowNegative- the allowNegative to set
-
getPrecision
public int getPrecision()- Returns:
- the precision
-
setPrecision
public void setPrecision(int precision) - Parameters:
precision- the precision to set
-
getScale
public int getScale()- Returns:
- the scale
-
setScale
public void setScale(int scale) - Parameters:
scale- the scale to set
-
getValidationMessageParams
Description copied from class:BaseConstraintParameters to be used in the string retrieved by this constraint's messageKey, ordered by number of the param- Overrides:
getValidationMessageParamsin classBaseConstraint- Returns:
- the validationMessageParams
-
completeValidation
Validates different requirements of component compiling a series of reports detailing information on errors found in the component. Used by the RiceDictionaryValidator.- Overrides:
completeValidationin classValidCharactersConstraint- Parameters:
tracer- Record of component's location
-