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 |
Handles field validation
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
validator | the TypeValidator to delegate validation to |
int org.exolab.castor.xml.FieldValidator.getMaxOccurs | ( | ) |
Returns the maximum number of occurances for a given object.
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.
Referenced by org.exolab.castor.xml.util.XMLClassDescriptorImpl.validate().
TypeValidator org.exolab.castor.xml.FieldValidator.getTypeValidator | ( | ) |
Returns true if a TypeValidator has been set
boolean org.exolab.castor.xml.FieldValidator.hasTypeValidator | ( | ) |
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.
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
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
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().
void org.exolab.castor.xml.FieldValidator.validate | ( | Object | object, | |
ValidationContext | context | |||
) | throws ValidationException |
Validates the given Object
object | the Object that contains the field to validate | |
context | the ValidationContext |
Reimplemented from org.exolab.castor.xml.Validator.
References org.exolab.castor.util.List.get(), org.exolab.castor.mapping.FieldDescriptor.getFieldName(), org.exolab.castor.mapping.FieldDescriptor.getHandler(), org.exolab.castor.mapping.FieldHandler.getValue(), org.exolab.castor.xml.XMLFieldDescriptor.getXMLName(), org.exolab.castor.xml.XMLFieldDescriptor.isNillable(), org.exolab.castor.xml.XMLFieldDescriptor.isReference(), org.exolab.castor.mapping.FieldDescriptor.isRequired(), org.exolab.castor.mapping.FieldDescriptor.isTransient(), org.exolab.castor.util.List.size(), and org.exolab.castor.xml.TypeValidator.validate().
Referenced by org.exolab.castor.xml.util.XMLClassDescriptorImpl.validate(), and org.exolab.castor.xml.Validator.validate().