Class FixedPointPatternConstraint

All Implemented Interfaces:
Serializable, Cloneable, Copyable, DictionaryBean, Constraint

public class FixedPointPatternConstraint extends ValidDataPatternConstraint
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 Details

    • allowNegative

      protected boolean allowNegative
    • precision

      protected int precision
    • scale

      protected int scale
  • Constructor Details

    • FixedPointPatternConstraint

      public FixedPointPatternConstraint()
  • Method Details

    • getRegexString

      protected String getRegexString()
      Overriding retrieval of
      Specified by:
      getRegexString in class ValidDataPatternConstraint
      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

      public List<String> getValidationMessageParams()
      Description copied from class: BaseConstraint
      Parameters to be used in the string retrieved by this constraint's messageKey, ordered by number of the param
      Overrides:
      getValidationMessageParams in class BaseConstraint
      Returns:
      the validationMessageParams
    • completeValidation

      public void completeValidation(ValidationTrace tracer)
      Validates different requirements of component compiling a series of reports detailing information on errors found in the component. Used by the RiceDictionaryValidator.
      Overrides:
      completeValidation in class ValidCharactersConstraint
      Parameters:
      tracer - Record of component's location