Package org.exolab.castor.mapping.xml
Class FieldMapping
- java.lang.Object
-
- org.exolab.castor.mapping.xml.FieldMapping
-
- All Implemented Interfaces:
java.io.Serializable
public class FieldMapping extends java.lang.Object implements java.io.SerializableThe 'field' element is used to describe the property of a Java object.- Version:
- $Revision$ $Date$
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FieldMapping()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddeleteContainer()voiddeleteDirect()voiddeleteIdentity()voiddeleteLazy()voiddeleteNillable()voiddeleteRequired()voiddeleteTransient()BindXmlgetBindXml()Returns the value of field 'bindXml'.FieldMappingCollectionTypegetCollection()Returns the value of field 'collection'.java.lang.StringgetComparator()Returns the value of field 'comparator'.booleangetContainer()Returns the value of field 'container'.java.lang.StringgetCreateMethod()Returns the value of field 'createMethod'.java.lang.StringgetDescription()Returns the value of field 'description'.booleangetDirect()Returns the value of field 'direct'.java.lang.StringgetGetMethod()Returns the value of field 'getMethod'.java.lang.StringgetHandler()Returns the value of field 'handler'.java.lang.StringgetHasMethod()Returns the value of field 'hasMethod'.booleangetIdentity()Returns the value of field 'identity'.booleangetLazy()Returns the value of field 'lazy'.LdapgetLdap()Returns the value of field 'ldap'.java.lang.StringgetName()Returns the value of field 'name'.booleangetNillable()Returns the value of field 'nillable'.booleangetRequired()Returns the value of field 'required'.java.lang.StringgetSetMethod()Returns the value of field 'setMethod'.SqlgetSql()Returns the value of field 'sql'.booleangetTransient()Returns the value of field 'transient'.java.lang.StringgetType()Returns the value of field 'type'.booleanhasContainer()Method hasContainer.booleanhasDirect()Method hasDirect.booleanhasIdentity()Method hasIdentity.booleanhasLazy()Method hasLazy.booleanhasNillable()Method hasNillable.booleanhasRequired()Method hasRequired.booleanhasTransient()Method hasTransient.booleanisContainer()Returns the value of field 'container'.booleanisDirect()Returns the value of field 'direct'.booleanisIdentity()Returns the value of field 'identity'.booleanisLazy()Returns the value of field 'lazy'.booleanisNillable()Returns the value of field 'nillable'.booleanisRequired()Returns the value of field 'required'.booleanisTransient()Returns the value of field 'transient'.booleanisValid()Method isValid.voidmarshal(java.io.Writer out)voidmarshal(org.xml.sax.ContentHandler handler)voidsetBindXml(BindXml bindXml)Sets the value of field 'bindXml'.voidsetCollection(FieldMappingCollectionType collection)Sets the value of field 'collection'.voidsetComparator(java.lang.String comparator)Sets the value of field 'comparator'.voidsetContainer(boolean container)Sets the value of field 'container'.voidsetCreateMethod(java.lang.String createMethod)Sets the value of field 'createMethod'.voidsetDescription(java.lang.String description)Sets the value of field 'description'.voidsetDirect(boolean direct)Sets the value of field 'direct'.voidsetGetMethod(java.lang.String getMethod)Sets the value of field 'getMethod'.voidsetHandler(java.lang.String handler)Sets the value of field 'handler'.voidsetHasMethod(java.lang.String hasMethod)Sets the value of field 'hasMethod'.voidsetIdentity(boolean identity)Sets the value of field 'identity'.voidsetLazy(boolean lazy)Sets the value of field 'lazy'.voidsetLdap(Ldap ldap)Sets the value of field 'ldap'.voidsetName(java.lang.String name)Sets the value of field 'name'.voidsetNillable(boolean nillable)Sets the value of field 'nillable'.voidsetRequired(boolean required)Sets the value of field 'required'.voidsetSetMethod(java.lang.String setMethod)Sets the value of field 'setMethod'.voidsetSql(Sql sql)Sets the value of field 'sql'.voidsetTransient(boolean _transient)Sets the value of field 'transient'.voidsetType(java.lang.String type)Sets the value of field 'type'.static FieldMappingunmarshal(java.io.Reader reader)Method unmarshal.voidvalidate()
-
-
-
Method Detail
-
deleteContainer
public void deleteContainer()
-
deleteDirect
public void deleteDirect()
-
deleteIdentity
public void deleteIdentity()
-
deleteLazy
public void deleteLazy()
-
deleteNillable
public void deleteNillable()
-
deleteRequired
public void deleteRequired()
-
deleteTransient
public void deleteTransient()
-
getBindXml
public BindXml getBindXml()
Returns the value of field 'bindXml'. The field 'bindXml' has the following description: The 'bind-xml' element is used for specifying XML specific databinding properties and behavior for a specific field. 'bind-xml' may only appear as a child of a 'field' element.- Returns:
- the value of field 'BindXml'.
-
getCollection
public FieldMappingCollectionType getCollection()
Returns the value of field 'collection'. The field 'collection' has the following description: An optional attribute used to specify the type of the collection, if the property is multi-valued.- Returns:
- the value of field 'Collection'.
-
getComparator
public java.lang.String getComparator()
Returns the value of field 'comparator'.- Returns:
- the value of field 'Comparator'.
-
getContainer
public boolean getContainer()
Returns the value of field 'container'. The field 'container' has the following description: Indicates whether the field should be treated as a container, i.e. only it's fields should be persisted, but not the containing class itself. In this case, the container attribute should be set to true (supported in Castor XML only).- Returns:
- the value of field 'Container'.
-
getCreateMethod
public java.lang.String getCreateMethod()
Returns the value of field 'createMethod'.- Returns:
- the value of field 'CreateMethod'.
-
getDescription
public java.lang.String getDescription()
Returns the value of field 'description'.- Returns:
- the value of field 'Description'.
-
getDirect
public boolean getDirect()
Returns the value of field 'direct'.- Returns:
- the value of field 'Direct'.
-
getGetMethod
public java.lang.String getGetMethod()
Returns the value of field 'getMethod'.- Returns:
- the value of field 'GetMethod'.
-
getHandler
public java.lang.String getHandler()
Returns the value of field 'handler'.- Returns:
- the value of field 'Handler'.
-
getHasMethod
public java.lang.String getHasMethod()
Returns the value of field 'hasMethod'.- Returns:
- the value of field 'HasMethod'.
-
getIdentity
public boolean getIdentity()
Returns the value of field 'identity'.- Returns:
- the value of field 'Identity'.
-
getLazy
public boolean getLazy()
Returns the value of field 'lazy'.- Returns:
- the value of field 'Lazy'.
-
getLdap
public Ldap getLdap()
Returns the value of field 'ldap'.- Returns:
- the value of field 'Ldap'.
-
getName
public java.lang.String getName()
Returns the value of field 'name'. The field 'name' has the following description: A required attribute used to identify the name of the property.- Returns:
- the value of field 'Name'.
-
getNillable
public boolean getNillable()
Returns the value of field 'nillable'.- Returns:
- the value of field 'Nillable'.
-
getRequired
public boolean getRequired()
Returns the value of field 'required'.- Returns:
- the value of field 'Required'.
-
getSetMethod
public java.lang.String getSetMethod()
Returns the value of field 'setMethod'.- Returns:
- the value of field 'SetMethod'.
-
getSql
public Sql getSql()
Returns the value of field 'sql'. The field 'sql' has the following description: The 'sql' element is used to store information about the database column to which a Java object is mapped to.- Returns:
- the value of field 'Sql'.
-
getTransient
public boolean getTransient()
Returns the value of field 'transient'.- Returns:
- the value of field 'Transient'.
-
getType
public java.lang.String getType()
Returns the value of field 'type'. The field 'type' has the following description: An optional attribute used to identify the type of the property.- Returns:
- the value of field 'Type'.
-
hasContainer
public boolean hasContainer()
Method hasContainer.- Returns:
- true if at least one Container has been added
-
hasDirect
public boolean hasDirect()
Method hasDirect.- Returns:
- true if at least one Direct has been added
-
hasIdentity
public boolean hasIdentity()
Method hasIdentity.- Returns:
- true if at least one Identity has been added
-
hasLazy
public boolean hasLazy()
Method hasLazy.- Returns:
- true if at least one Lazy has been added
-
hasNillable
public boolean hasNillable()
Method hasNillable.- Returns:
- true if at least one Nillable has been added
-
hasRequired
public boolean hasRequired()
Method hasRequired.- Returns:
- true if at least one Required has been added
-
hasTransient
public boolean hasTransient()
Method hasTransient.- Returns:
- true if at least one Transient has been added
-
isContainer
public boolean isContainer()
Returns the value of field 'container'. The field 'container' has the following description: Indicates whether the field should be treated as a container, i.e. only it's fields should be persisted, but not the containing class itself. In this case, the container attribute should be set to true (supported in Castor XML only).- Returns:
- the value of field 'Container'.
-
isDirect
public boolean isDirect()
Returns the value of field 'direct'.- Returns:
- the value of field 'Direct'.
-
isIdentity
public boolean isIdentity()
Returns the value of field 'identity'.- Returns:
- the value of field 'Identity'.
-
isLazy
public boolean isLazy()
Returns the value of field 'lazy'.- Returns:
- the value of field 'Lazy'.
-
isNillable
public boolean isNillable()
Returns the value of field 'nillable'.- Returns:
- the value of field 'Nillable'.
-
isRequired
public boolean isRequired()
Returns the value of field 'required'.- Returns:
- the value of field 'Required'.
-
isTransient
public boolean isTransient()
Returns the value of field 'transient'.- Returns:
- the value of field 'Transient'.
-
isValid
public boolean isValid()
Method isValid.- Returns:
- true if this object is valid according to the schema
-
marshal
public void marshal(java.io.Writer out) throws MarshalException, ValidationException- Parameters:
out-- Throws:
MarshalException- if object is null or if any SAXException is thrown during marshalingValidationException- if this object is an invalid instance according to the schema
-
marshal
public void marshal(org.xml.sax.ContentHandler handler) throws java.io.IOException, MarshalException, ValidationException- Parameters:
handler-- Throws:
java.io.IOException- if an IOException occurs during marshalingValidationException- if this object is an invalid instance according to the schemaMarshalException- if object is null or if any SAXException is thrown during marshaling
-
setBindXml
public void setBindXml(BindXml bindXml)
Sets the value of field 'bindXml'. The field 'bindXml' has the following description: The 'bind-xml' element is used for specifying XML specific databinding properties and behavior for a specific field. 'bind-xml' may only appear as a child of a 'field' element.- Parameters:
bindXml- the value of field 'bindXml'.
-
setCollection
public void setCollection(FieldMappingCollectionType collection)
Sets the value of field 'collection'. The field 'collection' has the following description: An optional attribute used to specify the type of the collection, if the property is multi-valued.- Parameters:
collection- the value of field 'collection'.
-
setComparator
public void setComparator(java.lang.String comparator)
Sets the value of field 'comparator'.- Parameters:
comparator- the value of field 'comparator'.
-
setContainer
public void setContainer(boolean container)
Sets the value of field 'container'. The field 'container' has the following description: Indicates whether the field should be treated as a container, i.e. only it's fields should be persisted, but not the containing class itself. In this case, the container attribute should be set to true (supported in Castor XML only).- Parameters:
container- the value of field 'container'.
-
setCreateMethod
public void setCreateMethod(java.lang.String createMethod)
Sets the value of field 'createMethod'.- Parameters:
createMethod- the value of field 'createMethod'.
-
setDescription
public void setDescription(java.lang.String description)
Sets the value of field 'description'.- Parameters:
description- the value of field 'description'.
-
setDirect
public void setDirect(boolean direct)
Sets the value of field 'direct'.- Parameters:
direct- the value of field 'direct'.
-
setGetMethod
public void setGetMethod(java.lang.String getMethod)
Sets the value of field 'getMethod'.- Parameters:
getMethod- the value of field 'getMethod'.
-
setHandler
public void setHandler(java.lang.String handler)
Sets the value of field 'handler'.- Parameters:
handler- the value of field 'handler'.
-
setHasMethod
public void setHasMethod(java.lang.String hasMethod)
Sets the value of field 'hasMethod'.- Parameters:
hasMethod- the value of field 'hasMethod'.
-
setIdentity
public void setIdentity(boolean identity)
Sets the value of field 'identity'.- Parameters:
identity- the value of field 'identity'.
-
setLazy
public void setLazy(boolean lazy)
Sets the value of field 'lazy'.- Parameters:
lazy- the value of field 'lazy'.
-
setLdap
public void setLdap(Ldap ldap)
Sets the value of field 'ldap'.- Parameters:
ldap- the value of field 'ldap'.
-
setName
public void setName(java.lang.String name)
Sets the value of field 'name'. The field 'name' has the following description: A required attribute used to identify the name of the property.- Parameters:
name- the value of field 'name'.
-
setNillable
public void setNillable(boolean nillable)
Sets the value of field 'nillable'.- Parameters:
nillable- the value of field 'nillable'.
-
setRequired
public void setRequired(boolean required)
Sets the value of field 'required'.- Parameters:
required- the value of field 'required'.
-
setSetMethod
public void setSetMethod(java.lang.String setMethod)
Sets the value of field 'setMethod'.- Parameters:
setMethod- the value of field 'setMethod'.
-
setSql
public void setSql(Sql sql)
Sets the value of field 'sql'. The field 'sql' has the following description: The 'sql' element is used to store information about the database column to which a Java object is mapped to.- Parameters:
sql- the value of field 'sql'.
-
setTransient
public void setTransient(boolean _transient)
Sets the value of field 'transient'.- Parameters:
_transient-transient- the value of field 'transient'.
-
setType
public void setType(java.lang.String type)
Sets the value of field 'type'. The field 'type' has the following description: An optional attribute used to identify the type of the property.- Parameters:
type- the value of field 'type'.
-
unmarshal
public static FieldMapping unmarshal(java.io.Reader reader) throws MarshalException, ValidationException
Method unmarshal.- Parameters:
reader-- Returns:
- the unmarshaled org.exolab.castor.mapping.xml.FieldMapping
- Throws:
MarshalException- if object is null or if any SAXException is thrown during marshalingValidationException- if this object is an invalid instance according to the schema
-
validate
public void validate() throws ValidationException- Throws:
ValidationException- if this object is an invalid instance according to the schema
-
-