|
Arch4J 1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.arch4j.domain.Domain | +--org.arch4j.domain.StringDomain
Represents a string value. Implementing classes will override the getMaxLength and potentially the getMinLength methods. Bounds checking is automatically enforced.
Constructor Summary | |
StringDomain()
Default constructor. |
|
StringDomain(Object aValue)
Constructor which sets the domain's value to the specified argument. |
Method Summary | |
protected abstract int |
getMaxLength()
Defines the maximum string length used in validation. |
protected int |
getMinLength()
Defines the minimun string length 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
getMinLength and getMaxLength . |
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 |
public StringDomain()
Domain
, will
set the domain's value to null
.
public StringDomain(Object aValue) throws DomainValidationException
Method Detail |
protected int getMinLength()
protected abstract int getMaxLength()
protected void validate(Object aValue) throws DomainValidationException
aValue
fits within the bounds defined by
getMinLength
and getMaxLength
.
validate
in class Domain
DomainValidationException
- if the bounds check validation fail.protected String getValueClass()
Domain
will verify that any specified
values are of this type or a subclass of this type.
getValueClass
in class Domain
String
representation of the Class
type
used by this domain value container.
|
Arch4J 1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |