Public Member Functions

org.exolab.castor.xml.FieldValidator Class Reference

Inheritance diagram for org.exolab.castor.xml.FieldValidator:
org.exolab.castor.xml.Validator org.exolab.castor.xml.ClassValidator org.exolab.castor.xml.TypeValidator

List of all members.

Public Member Functions

 FieldValidator ()
 FieldValidator (TypeValidator validator)
int getMinOccurs ()
int getMaxOccurs ()
TypeValidator getTypeValidator ()
boolean hasTypeValidator ()
void setMinOccurs (int minOccurs)
void setMaxOccurs (int maxOccurs)
void setDescriptor (XMLFieldDescriptor descriptor)
void setValidator (TypeValidator validator)
void validate (Object object, ValidationContext context) throws ValidationException

Detailed Description

Handles field validation

Author:
Keith Visco
Version:
Revision:
1.10
Date:
2004/10/09 04:58:55

Constructor & Destructor Documentation

org.exolab.castor.xml.FieldValidator.FieldValidator (  ) 

Creates a default FieldValidator

org.exolab.castor.xml.FieldValidator.FieldValidator ( TypeValidator  validator  ) 

Creates a new FieldValidator using the given TypeValidator

Parameters:
validator the TypeValidator to delegate validation to

Member Function Documentation

int org.exolab.castor.xml.FieldValidator.getMaxOccurs (  ) 

Returns the maximum number of occurances for a given object.

Returns:
the maximum number of occurances for a given object. A negative value denotes no upper bound.

Referenced by org.exolab.castor.xml.util.XMLClassDescriptorImpl.canAccept().

int org.exolab.castor.xml.FieldValidator.getMinOccurs (  ) 

Returns the mimimum number of occurances for a given object.

Returns:
the mimimum number of occurances for a given object. A zero value denotes no lower bound (ie. the object is optional)

Referenced by org.exolab.castor.xml.util.XMLClassDescriptorImpl.validate().

TypeValidator org.exolab.castor.xml.FieldValidator.getTypeValidator (  ) 

Returns true if a TypeValidator has been set

Returns:
true if a TypeValidator has been set
boolean org.exolab.castor.xml.FieldValidator.hasTypeValidator (  ) 

Returns true if a TypeValidator has been set

Returns:
true if a TypeValidator has been set
void org.exolab.castor.xml.FieldValidator.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.

Parameters:
descriptor the field descriptor for the field to validate

Referenced by org.exolab.castor.xml.util.XMLFieldDescriptorImpl.setValidator(), and org.exolab.castor.xml.util.XMLFieldDescriptorImpl.XMLFieldDescriptorImpl().

void org.exolab.castor.xml.FieldValidator.setMaxOccurs ( int  maxOccurs  ) 

Sets the maximum number of occurances for a given object

Parameters:
maxOccurs the maximum number of times an object may occur. A negative value denotes no upper bound.
void org.exolab.castor.xml.FieldValidator.setMinOccurs ( int  minOccurs  ) 

Sets the mimimum number of occurances for a given object

Parameters:
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)

Referenced by org.exolab.castor.builder.binding.BindingDescriptor.BindingDescriptor(), org.exolab.castor.mapping.xml.ClassMappingDescriptor.ClassMappingDescriptor(), org.exolab.castor.builder.binding.ClassTypeDescriptor.ClassTypeDescriptor(), org.exolab.castor.builder.binding.ComponentBindingTypeChoiceDescriptor.ComponentBindingTypeChoiceDescriptor(), org.exolab.castor.builder.binding.ComponentBindingTypeDescriptor.ComponentBindingTypeDescriptor(), alma.acs.tools.comphelpergen.generated.ComponentHelperInfoDescriptor.ComponentHelperInfoDescriptor(), alma.acs.tools.comphelpergen.generated.ComponentInterfaceDescriptor.ComponentInterfaceDescriptor(), org.exolab.castor.mapping.xml.ContainerDescriptor.ContainerDescriptor(), alma.tools.entitybuilder.generated.EntitybuilderSettingsDescriptor.EntitybuilderSettingsDescriptor(), alma.tools.entitybuilder.generated.EntitySchemaDescriptor.EntitySchemaDescriptor(), org.exolab.castor.mapping.xml.FieldMappingDescriptor.FieldMappingDescriptor(), org.exolab.castor.mapping.xml.IncludeDescriptor.IncludeDescriptor(), org.exolab.castor.builder.binding.IncludeTypeDescriptor.IncludeTypeDescriptor(), org.exolab.castor.builder.binding.InterfaceDescriptor.InterfaceDescriptor(), org.exolab.castor.mapping.xml.KeyGeneratorDefDescriptor.KeyGeneratorDefDescriptor(), org.exolab.castor.mapping.xml.MappingRootDescriptor.MappingRootDescriptor(), org.exolab.castor.builder.binding.PackageTypeChoiceDescriptor.PackageTypeChoiceDescriptor(), org.exolab.castor.builder.binding.PackageTypeDescriptor.PackageTypeDescriptor(), org.exolab.castor.mapping.xml.ParamDescriptor.ParamDescriptor(), and org.exolab.castor.xml.util.XMLFieldDescriptorImpl.XMLFieldDescriptorImpl().

void org.exolab.castor.xml.FieldValidator.setValidator ( TypeValidator  validator  ) 

Referenced by org.exolab.castor.mapping.xml.ClassMappingDescriptor.ClassMappingDescriptor(), org.exolab.castor.builder.binding.ClassTypeDescriptor.ClassTypeDescriptor(), org.exolab.castor.builder.binding.ComponentBindingTypeDescriptor.ComponentBindingTypeDescriptor(), alma.acs.tools.comphelpergen.generated.ComponentHelperInfoDescriptor.ComponentHelperInfoDescriptor(), alma.acs.tools.comphelpergen.generated.ComponentInterfaceDescriptor.ComponentInterfaceDescriptor(), org.exolab.castor.mapping.xml.ContainerDescriptor.ContainerDescriptor(), alma.tools.entitybuilder.generated.EntitySchemaDescriptor.EntitySchemaDescriptor(), org.exolab.castor.mapping.xml.FieldMappingDescriptor.FieldMappingDescriptor(), org.exolab.castor.builder.binding.FieldTypeDescriptor.FieldTypeDescriptor(), org.exolab.castor.mapping.xml.IncludeDescriptor.IncludeDescriptor(), org.exolab.castor.builder.binding.InterfaceDescriptor.InterfaceDescriptor(), org.exolab.castor.mapping.xml.KeyGeneratorDefDescriptor.KeyGeneratorDefDescriptor(), org.exolab.castor.mapping.xml.LdapDescriptor.LdapDescriptor(), org.exolab.castor.mapping.xml.MappingRootDescriptor.MappingRootDescriptor(), org.exolab.castor.mapping.xml.MapToDescriptor.MapToDescriptor(), org.exolab.castor.builder.binding.NamingTypeDescriptor.NamingTypeDescriptor(), org.exolab.castor.builder.binding.PackageTypeChoiceDescriptor.PackageTypeChoiceDescriptor(), org.exolab.castor.builder.binding.PackageTypeDescriptor.PackageTypeDescriptor(), org.exolab.castor.mapping.xml.ParamDescriptor.ParamDescriptor(), and alma.tools.entitybuilder.generated.XmlNamespace2JPackageDescriptor.XmlNamespace2JPackageDescriptor().


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