Arch4J 1.1

org.arch4j.domain
Class BigDecimalDomain

java.lang.Object
  |
  +--org.arch4j.domain.Domain
        |
        +--org.arch4j.domain.BigDecimalDomain
All Implemented Interfaces:
Serializable

public class BigDecimalDomain
extends Domain

Represents a BigDecimal value. Bound checking of the maximum and minimum value is automatically enforced.

Version:
1.0
Author:
David Colwell
See Also:
Serialized Form

Constructor Summary
BigDecimalDomain()
          Default constructor.
BigDecimalDomain(Object aValue)
          Constructor which sets the domain's value to the specified argument.
 
Method Summary
protected  BigDecimal getMaxValue()
          Defines the maximum string length used in validation.
protected  BigDecimal getMinValue()
          Defines the minimun integer value used in validation.
protected  String getValueClass()
          The base class Domain will verify that any specified values are of this type or a subclass of this type.
protected  void validate(Object aValue)
          Validates that aValue fits within the bounds defined by getMinValue and getMaxValue.
 
Methods inherited from class org.arch4j.domain.Domain
getValue, setValue, toString, validateType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BigDecimalDomain

public BigDecimalDomain()
Default constructor. Ultimately, the base class, Domain, will set the domain's value to null.


BigDecimalDomain

public BigDecimalDomain(Object aValue)
                 throws DomainValidationException
Constructor which sets the domain's value to the specified argument.

Method Detail

getMinValue

protected BigDecimal getMinValue()
Defines the minimun integer value used in validation. Unless overridden, it will return 0.

Returns:
the minimum value.

getMaxValue

protected BigDecimal getMaxValue()
Defines the maximum string length used in validation. Unless overridden, it will return Integer.MAX_VALUE.

Returns:
the maximum value.

validate

protected void validate(Object aValue)
                 throws DomainValidationException
Validates that aValue fits within the bounds defined by getMinValue and getMaxValue.

Specified by:
validate in class Domain
Throws:
DomainValidationException - if the bounds check validation fail.

getValueClass

protected String getValueClass()
The base class Domain will verify that any specified values are of this type or a subclass of this type.

Specified by:
getValueClass in class Domain
Returns:
the String representation of the Class type used by this domain value container.

Arch4J 1.1

Copyright © 2000-2004 SpiderLogic, a service of Wipfli Ullrich Bertelson LLP.