Package org.exolab.castor.mapping.xml
Class ClassMapping
java.lang.Object
org.exolab.castor.mapping.xml.ClassMapping
- All Implemented Interfaces:
Serializable
The 'class' element is used to store information about mapping
of a class.
- Version:
- $Revision$ $Date$
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddIdentity(int index, String vIdentity) voidaddIdentity(String vIdentity) voidaddNamedNativeQuery(int index, NamedNativeQuery vNamedNativeQuery) voidaddNamedNativeQuery(NamedNativeQuery vNamedNativeQuery) voidaddNamedQuery(int index, NamedQuery vNamedQuery) voidaddNamedQuery(NamedQuery vNamedQuery) voidvoidEnumeration<? extends String> Method enumerateIdentity.Enumeration<? extends NamedNativeQuery> Method enumerateNamedNativeQuery.Enumeration<? extends NamedQuery> Method enumerateNamedQuery.Returns the value of field 'access'.booleanReturns the value of field 'autoComplete'.Returns the value of field 'cacheTypeMapping'.Returns the value of field 'classChoice'.Returns the value of field 'depends'.Returns the value of field 'description'.Returns the value of field 'extends'.String[]Method getIdentity.Returns the contents of the collection in an Array.getIdentity(int index) Method getIdentity.intMethod getIdentityCount.Returns the value of field 'keyGenerator'.getMapTo()Returns the value of field 'mapTo'.getName()Returns the value of field 'name'.Method getNamedNativeQuery.Returns the contents of the collection in an Array.getNamedNativeQuery(int index) Method getNamedNativeQuery.intMethod getNamedNativeQueryCount.Method getNamedQuery.Returns the contents of the collection in an Array.getNamedQuery(int index) Method getNamedQuery.intMethod getNamedQueryCount.booleanReturns the value of field 'verifyConstructable'.Returns the value of field 'version'.booleanMethod hasAutoComplete.booleanMethod hasVerifyConstructable.booleanReturns the value of field 'autoComplete'.booleanisValid()Method isValid.booleanReturns the value of field 'verifyConstructable'.Method iterateIdentity.Iterator<? extends NamedNativeQuery> Method iterateNamedNativeQuery.Iterator<? extends NamedQuery> Method iterateNamedQuery.voidvoidmarshal(ContentHandler handler) voidvoidvoidbooleanremoveIdentity(String vIdentity) Method removeIdentity.removeIdentityAt(int index) Method removeIdentityAt.booleanremoveNamedNativeQuery(NamedNativeQuery vNamedNativeQuery) Method removeNamedNativeQuery.removeNamedNativeQueryAt(int index) Method removeNamedNativeQueryAt.booleanremoveNamedQuery(NamedQuery vNamedQuery) Method removeNamedQuery.removeNamedQueryAt(int index) Method removeNamedQueryAt.voidsetAccess(ClassMappingAccessType access) Sets the value of field 'access'.voidsetAutoComplete(boolean autoComplete) Sets the value of field 'autoComplete'.voidsetCacheTypeMapping(CacheTypeMapping cacheTypeMapping) Sets the value of field 'cacheTypeMapping'.voidsetClassChoice(ClassChoice classChoice) Sets the value of field 'classChoice'.voidsetDepends(Object depends) Sets the value of field 'depends'.voidsetDescription(String description) Sets the value of field 'description'.voidsetExtends(Object _extends) Sets the value of field 'extends'.voidsetIdentity(int index, String vIdentity) voidsetIdentity(String[] vIdentityArray) voidsetKeyGenerator(String keyGenerator) Sets the value of field 'keyGenerator'.voidSets the value of field 'mapTo'.voidSets the value of field 'name'.voidsetNamedNativeQuery(int index, NamedNativeQuery vNamedNativeQuery) voidsetNamedNativeQuery(NamedNativeQuery[] vNamedNativeQueryArray) voidsetNamedQuery(int index, NamedQuery vNamedQuery) voidsetNamedQuery(NamedQuery[] vNamedQueryArray) voidsetVerifyConstructable(boolean verifyConstructable) Sets the value of field 'verifyConstructable'.voidsetVersion(String version) Sets the value of field 'version'.static ClassMappingMethod unmarshal.voidvalidate()
-
Constructor Details
-
ClassMapping
public ClassMapping()
-
-
Method Details
-
addIdentity
- Parameters:
vIdentity-- Throws:
IndexOutOfBoundsException- if the index given is outside the bounds of the collection
-
addIdentity
- Parameters:
index-vIdentity-- Throws:
IndexOutOfBoundsException- if the index given is outside the bounds of the collection
-
addNamedNativeQuery
public void addNamedNativeQuery(NamedNativeQuery vNamedNativeQuery) throws IndexOutOfBoundsException - Parameters:
vNamedNativeQuery-- Throws:
IndexOutOfBoundsException- if the index given is outside the bounds of the collection
-
addNamedNativeQuery
public void addNamedNativeQuery(int index, NamedNativeQuery vNamedNativeQuery) throws IndexOutOfBoundsException - Parameters:
index-vNamedNativeQuery-- Throws:
IndexOutOfBoundsException- if the index given is outside the bounds of the collection
-
addNamedQuery
- Parameters:
vNamedQuery-- Throws:
IndexOutOfBoundsException- if the index given is outside the bounds of the collection
-
addNamedQuery
- Parameters:
index-vNamedQuery-- Throws:
IndexOutOfBoundsException- if the index given is outside the bounds of the collection
-
deleteAutoComplete
public void deleteAutoComplete() -
deleteVerifyConstructable
public void deleteVerifyConstructable() -
enumerateIdentity
Method enumerateIdentity.- Returns:
- an Enumeration over all possible elements of this collection
-
enumerateNamedNativeQuery
Method enumerateNamedNativeQuery.- Returns:
- an Enumeration over all possible elements of this collection
-
enumerateNamedQuery
Method enumerateNamedQuery.- Returns:
- an Enumeration over all possible elements of this collection
-
getAccess
Returns the value of field 'access'.- Returns:
- the value of field 'Access'.
-
getAutoComplete
public boolean getAutoComplete()Returns the value of field 'autoComplete'. The field 'autoComplete' has the following description: Specifies whether Castor should use reflection to establish XML data binding information at startup time for those fields that are not mapped explicitly.- Returns:
- the value of field 'AutoComplete'.
-
getCacheTypeMapping
Returns the value of field 'cacheTypeMapping'.- Returns:
- the value of field 'CacheTypeMapping'.
-
getClassChoice
Returns the value of field 'classChoice'.- Returns:
- the value of field 'ClassChoice'.
-
getDepends
Returns the value of field 'depends'. The field 'depends' has the following description: An optional attribute to specify that one object depends on another object.- Returns:
- the value of field 'Depends'.
-
getDescription
Returns the value of field 'description'.- Returns:
- the value of field 'Description'.
-
getExtends
Returns the value of field 'extends'. The field 'extends' has the following description: An optional attribute to specify the extension relationship between objects. Used only if mapping of the another object is provided.- Returns:
- the value of field 'Extends'.
-
getIdentity
Method getIdentity.- Parameters:
index-- Returns:
- the value of the java.lang.String at the given index
- Throws:
IndexOutOfBoundsException- if the index given is outside the bounds of the collection
-
getIdentity
Method getIdentity.Returns the contents of the collection in an Array.Note: Just in case the collection contents are changing in another thread, we pass a 0-length Array of the correct type into the API call. This way we know that the Array returned is of exactly the correct length.
- Returns:
- this collection as an Array
-
getIdentityCount
public int getIdentityCount()Method getIdentityCount.- Returns:
- the size of this collection
-
getKeyGenerator
Returns the value of field 'keyGenerator'.- Returns:
- the value of field 'KeyGenerator'.
-
getMapTo
Returns the value of field 'mapTo'. The field 'mapTo' has the following description: The 'map-to' element is used for specifying the name of the item that should be associated with the given Java object.- Returns:
- the value of field 'MapTo'.
-
getName
Returns the value of field 'name'. The field 'name' has the following description: Specifies the fully qualified package name of the Java object needed to be mapped.- Returns:
- the value of field 'Name'.
-
getNamedNativeQuery
Method getNamedNativeQuery.- Parameters:
index-- Returns:
- the value of the org.exolab.castor.mapping.xml.NamedNativeQuery at the given index
- Throws:
IndexOutOfBoundsException- if the index given is outside the bounds of the collection
-
getNamedNativeQuery
Method getNamedNativeQuery.Returns the contents of the collection in an Array.Note: Just in case the collection contents are changing in another thread, we pass a 0-length Array of the correct type into the API call. This way we know that the Array returned is of exactly the correct length.
- Returns:
- this collection as an Array
-
getNamedNativeQueryCount
public int getNamedNativeQueryCount()Method getNamedNativeQueryCount.- Returns:
- the size of this collection
-
getNamedQuery
Method getNamedQuery.- Parameters:
index-- Returns:
- the value of the org.exolab.castor.mapping.xml.NamedQuery at the given index
- Throws:
IndexOutOfBoundsException- if the index given is outside the bounds of the collection
-
getNamedQuery
Method getNamedQuery.Returns the contents of the collection in an Array.Note: Just in case the collection contents are changing in another thread, we pass a 0-length Array of the correct type into the API call. This way we know that the Array returned is of exactly the correct length.
- Returns:
- this collection as an Array
-
getNamedQueryCount
public int getNamedQueryCount()Method getNamedQueryCount.- Returns:
- the size of this collection
-
getVerifyConstructable
public boolean getVerifyConstructable()Returns the value of field 'verifyConstructable'.- Returns:
- the value of field 'VerifyConstructable'.
-
getVersion
Returns the value of field 'version'. The field 'version' has the following description: If set to the name of a mapped field, this field will be used for check on object modifications during transactions (Castor JDO only).- Returns:
- the value of field 'Version'.
-
hasAutoComplete
public boolean hasAutoComplete()Method hasAutoComplete.- Returns:
- true if at least one AutoComplete has been added
-
hasVerifyConstructable
public boolean hasVerifyConstructable()Method hasVerifyConstructable.- Returns:
- true if at least one VerifyConstructable has been added
-
isAutoComplete
public boolean isAutoComplete()Returns the value of field 'autoComplete'. The field 'autoComplete' has the following description: Specifies whether Castor should use reflection to establish XML data binding information at startup time for those fields that are not mapped explicitly.- Returns:
- the value of field 'AutoComplete'.
-
isValid
public boolean isValid()Method isValid.- Returns:
- true if this object is valid according to the schema
-
isVerifyConstructable
public boolean isVerifyConstructable()Returns the value of field 'verifyConstructable'.- Returns:
- the value of field 'VerifyConstructable'.
-
iterateIdentity
Method iterateIdentity.- Returns:
- an Iterator over all possible elements in this collection
-
iterateNamedNativeQuery
Method iterateNamedNativeQuery.- Returns:
- an Iterator over all possible elements in this collection
-
iterateNamedQuery
Method iterateNamedQuery.- Returns:
- an Iterator over all possible elements in this collection
-
marshal
- 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(ContentHandler handler) throws IOException, MarshalException, ValidationException - Parameters:
handler-- Throws:
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
-
removeAllIdentity
public void removeAllIdentity() -
removeAllNamedNativeQuery
public void removeAllNamedNativeQuery() -
removeAllNamedQuery
public void removeAllNamedQuery() -
removeIdentity
Method removeIdentity.- Parameters:
vIdentity-- Returns:
- true if the object was removed from the collection.
-
removeIdentityAt
Method removeIdentityAt.- Parameters:
index-- Returns:
- the element removed from the collection
-
removeNamedNativeQuery
Method removeNamedNativeQuery.- Parameters:
vNamedNativeQuery-- Returns:
- true if the object was removed from the collection.
-
removeNamedNativeQueryAt
Method removeNamedNativeQueryAt.- Parameters:
index-- Returns:
- the element removed from the collection
-
removeNamedQuery
Method removeNamedQuery.- Parameters:
vNamedQuery-- Returns:
- true if the object was removed from the collection.
-
removeNamedQueryAt
Method removeNamedQueryAt.- Parameters:
index-- Returns:
- the element removed from the collection
-
setAccess
Sets the value of field 'access'.- Parameters:
access- the value of field 'access'.
-
setAutoComplete
public void setAutoComplete(boolean autoComplete) Sets the value of field 'autoComplete'. The field 'autoComplete' has the following description: Specifies whether Castor should use reflection to establish XML data binding information at startup time for those fields that are not mapped explicitly.- Parameters:
autoComplete- the value of field 'autoComplete'.
-
setCacheTypeMapping
Sets the value of field 'cacheTypeMapping'.- Parameters:
cacheTypeMapping- the value of field 'cacheTypeMapping'
-
setClassChoice
Sets the value of field 'classChoice'.- Parameters:
classChoice- the value of field 'classChoice'.
-
setDepends
Sets the value of field 'depends'. The field 'depends' has the following description: An optional attribute to specify that one object depends on another object.- Parameters:
depends- the value of field 'depends'.
-
setDescription
Sets the value of field 'description'.- Parameters:
description- the value of field 'description'.
-
setExtends
Sets the value of field 'extends'. The field 'extends' has the following description: An optional attribute to specify the extension relationship between objects. Used only if mapping of the another object is provided.- Parameters:
_extends-extends- the value of field 'extends'.
-
setIdentity
- Parameters:
index-vIdentity-- Throws:
IndexOutOfBoundsException- if the index given is outside the bounds of the collection
-
setIdentity
- Parameters:
vIdentityArray-
-
setKeyGenerator
Sets the value of field 'keyGenerator'.- Parameters:
keyGenerator- the value of field 'keyGenerator'.
-
setMapTo
Sets the value of field 'mapTo'. The field 'mapTo' has the following description: The 'map-to' element is used for specifying the name of the item that should be associated with the given Java object.- Parameters:
mapTo- the value of field 'mapTo'.
-
setName
Sets the value of field 'name'. The field 'name' has the following description: Specifies the fully qualified package name of the Java object needed to be mapped.- Parameters:
name- the value of field 'name'.
-
setNamedNativeQuery
public void setNamedNativeQuery(int index, NamedNativeQuery vNamedNativeQuery) throws IndexOutOfBoundsException - Parameters:
index-vNamedNativeQuery-- Throws:
IndexOutOfBoundsException- if the index given is outside the bounds of the collection
-
setNamedNativeQuery
- Parameters:
vNamedNativeQueryArray-
-
setNamedQuery
- Parameters:
index-vNamedQuery-- Throws:
IndexOutOfBoundsException- if the index given is outside the bounds of the collection
-
setNamedQuery
- Parameters:
vNamedQueryArray-
-
setVerifyConstructable
public void setVerifyConstructable(boolean verifyConstructable) Sets the value of field 'verifyConstructable'.- Parameters:
verifyConstructable- the value of field 'verifyConstructable'.
-
setVersion
Sets the value of field 'version'. The field 'version' has the following description: If set to the name of a mapped field, this field will be used for check on object modifications during transactions (Castor JDO only).- Parameters:
version- the value of field 'version'.
-
unmarshal
Method unmarshal.- Parameters:
reader-- Returns:
- the unmarshaled org.exolab.castor.mapping.xml.ClassMapping
- 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
- Throws:
ValidationException- if this object is an invalid instance according to the schema
-