Public Member Functions

org.exolab.castor.xml.validators.DecimalValidator Class Reference

Inheritance diagram for org.exolab.castor.xml.validators.DecimalValidator:
org.exolab.castor.xml.TypeValidator

List of all members.

Public Member Functions

 DecimalValidator ()
void clearMax ()
void clearMin ()
BigDecimal getFixed ()
BigDecimal getMaxInclusive ()
BigDecimal getMinInclusive ()
boolean hasFixed ()
void setMinExclusive (BigDecimal minValue)
void setMinInclusive (BigDecimal minValue)
void setMaxExclusive (BigDecimal maxValue)
void setMaxInclusive (BigDecimal maxValue)
void setTotalDigits (int totalDig)
void setFractionDigits (int fractionDig)
void setFixed (BigDecimal fixed)
void validate (BigDecimal bd) throws ValidationException
void validate (Object object) throws ValidationException
void validate (Object object, ValidationContext context) throws ValidationException

Detailed Description

The Decimal Validation class. This class handles validation for the Decimal type.

TODO : pattern, enumeration

Author:
Arnaud Blandin
Version:
Revision:
1.4
Date:
2004/10/04 08:42:40

Constructor & Destructor Documentation

org.exolab.castor.xml.validators.DecimalValidator.DecimalValidator (  ) 

Creates a new DecimalValidator with no restrictions


Member Function Documentation

void org.exolab.castor.xml.validators.DecimalValidator.clearMax (  ) 

Clears the maximum value for this DecimalValidator

void org.exolab.castor.xml.validators.DecimalValidator.clearMin (  ) 

Clears the minimum value for this DecimalValidator

BigDecimal org.exolab.castor.xml.validators.DecimalValidator.getFixed (  ) 

Returns the fixed value that decimals validated with this validator must be equal to. A null value is returned if no fixed value has been specified.

Returns:
the fixed value to validate against.
BigDecimal org.exolab.castor.xml.validators.DecimalValidator.getMaxInclusive (  ) 

Returns the maximum value that decimals validated with this validator must be equal to or less than. A null value is returned if no maximum value has been specified.

Returns:
the maximum inclusive value to validate against.
BigDecimal org.exolab.castor.xml.validators.DecimalValidator.getMinInclusive (  ) 

Returns the minimum value that decimals validated with this validator must be equal to or greater than. A null value is returned if no minimum value has been specified.

Returns:
the minimum inclusive value to validate against.
boolean org.exolab.castor.xml.validators.DecimalValidator.hasFixed (  ) 

Returns true if a fixed value, to validate against, has been set.

Returns:
true if a fixed value has been set.
void org.exolab.castor.xml.validators.DecimalValidator.setFixed ( BigDecimal  fixed  ) 

Sets the fixed value the decimal to validate must be equal to.

Parameters:
fixed the fixed value
void org.exolab.castor.xml.validators.DecimalValidator.setFractionDigits ( int  fractionDig  ) 

Sets the fractionDigits facet for this decimal validator.

Parameters:
fractionDig the value of fractionDigits (must be >=0)
void org.exolab.castor.xml.validators.DecimalValidator.setMaxExclusive ( BigDecimal  maxValue  ) 

Sets the maximum value that decimals validated with this validator must be less than

Parameters:
maxValue the maximum value an decimal validated with this validator must be less than
void org.exolab.castor.xml.validators.DecimalValidator.setMaxInclusive ( BigDecimal  maxValue  ) 

Sets the maximum value that decimals validated with this validator are allowed to be

Parameters:
maxValue the maximum value an decimal validated with this validator may be
void org.exolab.castor.xml.validators.DecimalValidator.setMinExclusive ( BigDecimal  minValue  ) 

Sets the minimum value that decimals validated with this validator must be greater than

Parameters:
minValue the minimum value an decimal validated with this validator must be greater than
void org.exolab.castor.xml.validators.DecimalValidator.setMinInclusive ( BigDecimal  minValue  ) 

Sets the minimum value that decimals validated with this validator are allowed to be

Parameters:
minValue the minimum value an decimal validated with this validator may be
void org.exolab.castor.xml.validators.DecimalValidator.setTotalDigits ( int  totalDig  ) 

Sets the totalDigits facet for this decimal validator.

Parameters:
totalDig the value of totalDigits (must be >0)
void org.exolab.castor.xml.validators.DecimalValidator.validate ( Object  object  )  throws ValidationException

Validates the given Object

Parameters:
object the Object to validate

References org.exolab.castor.xml.validators.DecimalValidator.validate().

void org.exolab.castor.xml.validators.DecimalValidator.validate ( Object  object,
ValidationContext  context 
) throws ValidationException

Validates the given Object

Parameters:
object the Object to validate
context the ValidationContext

Implements org.exolab.castor.xml.TypeValidator.

References org.exolab.castor.xml.validators.DecimalValidator.validate().

void org.exolab.castor.xml.validators.DecimalValidator.validate ( BigDecimal  bd  )  throws ValidationException

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties