org.exolab.castor.xml
Class FieldValidator
- ClassValidator, TypeValidator
public class FieldValidator
Handles field validation
$Revision: 1.1.1.1 $ $Date: 2003/03/03 07:09:09 $
FieldValidator
public FieldValidator()
Creates a default FieldValidator
FieldValidator
public FieldValidator(TypeValidator validator)
Creates a new FieldValidator using the given TypeValidator
validator
- the TypeValidator to delegate validation to
getMaxOccurs
public int getMaxOccurs()
Returns the maximum number of occurances for a given object.
getMinOccurs
public int getMinOccurs()
Returns the mimimum number of occurances for a given object.
getTypeValidator
public TypeValidator getTypeValidator()
Returns true if a TypeValidator has been set
- true if a TypeValidator has been set
hasTypeValidator
public boolean hasTypeValidator()
Returns true if a TypeValidator has been set
- true if a TypeValidator has been set
setDescriptor
public void setDescriptor(XMLFieldDescriptor descriptor)
Sets the field descriptor to use for obtaining information
about the field to validate, such as the field name, the field
handler, etc.
descriptor
- the field descriptor for the field to validate
setMaxOccurs
public void setMaxOccurs(int maxOccurs)
Sets the maximum number of occurances for a given object
maxOccurs
- the maximum number of times an object
may occur. A negative value denotes no upper bound.
setMinOccurs
public void setMinOccurs(int minOccurs)
Sets the mimimum number of occurances for a given object
minOccurs
- the minimum number of times an object must occur
in order to be valid.
A zero, or negative value denotes no lower bound
(ie. the object is optional)
Intalio Inc. (C) 1999-2003. All rights reserved http://www.intalio.com