Package org.exolab.castor.mapping.xml
Class ClassMapping
- java.lang.Object
-
- org.exolab.castor.mapping.xml.ClassMapping
-
- All Implemented Interfaces:
java.io.Serializable
public class ClassMapping extends java.lang.Object implements java.io.Serializable
The 'class' element is used to store information about mapping of a class.- Version:
- $Revision$ $Date$
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ClassMapping()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addIdentity(int index, java.lang.String vIdentity)
void
addIdentity(java.lang.String vIdentity)
void
addNamedNativeQuery(int index, NamedNativeQuery vNamedNativeQuery)
void
addNamedNativeQuery(NamedNativeQuery vNamedNativeQuery)
void
addNamedQuery(int index, NamedQuery vNamedQuery)
void
addNamedQuery(NamedQuery vNamedQuery)
void
deleteAutoComplete()
void
deleteVerifyConstructable()
java.util.Enumeration<? extends java.lang.String>
enumerateIdentity()
Method enumerateIdentity.java.util.Enumeration<? extends NamedNativeQuery>
enumerateNamedNativeQuery()
Method enumerateNamedNativeQuery.java.util.Enumeration<? extends NamedQuery>
enumerateNamedQuery()
Method enumerateNamedQuery.ClassMappingAccessType
getAccess()
Returns the value of field 'access'.boolean
getAutoComplete()
Returns the value of field 'autoComplete'.CacheTypeMapping
getCacheTypeMapping()
Returns the value of field 'cacheTypeMapping'.ClassChoice
getClassChoice()
Returns the value of field 'classChoice'.java.lang.Object
getDepends()
Returns the value of field 'depends'.java.lang.String
getDescription()
Returns the value of field 'description'.java.lang.Object
getExtends()
Returns the value of field 'extends'.java.lang.String[]
getIdentity()
Method getIdentity.Returns the contents of the collection in an Array.java.lang.String
getIdentity(int index)
Method getIdentity.int
getIdentityCount()
Method getIdentityCount.java.lang.String
getKeyGenerator()
Returns the value of field 'keyGenerator'.MapTo
getMapTo()
Returns the value of field 'mapTo'.java.lang.String
getName()
Returns the value of field 'name'.NamedNativeQuery[]
getNamedNativeQuery()
Method getNamedNativeQuery.Returns the contents of the collection in an Array.NamedNativeQuery
getNamedNativeQuery(int index)
Method getNamedNativeQuery.int
getNamedNativeQueryCount()
Method getNamedNativeQueryCount.NamedQuery[]
getNamedQuery()
Method getNamedQuery.Returns the contents of the collection in an Array.NamedQuery
getNamedQuery(int index)
Method getNamedQuery.int
getNamedQueryCount()
Method getNamedQueryCount.boolean
getVerifyConstructable()
Returns the value of field 'verifyConstructable'.java.lang.String
getVersion()
Returns the value of field 'version'.boolean
hasAutoComplete()
Method hasAutoComplete.boolean
hasVerifyConstructable()
Method hasVerifyConstructable.boolean
isAutoComplete()
Returns the value of field 'autoComplete'.boolean
isValid()
Method isValid.boolean
isVerifyConstructable()
Returns the value of field 'verifyConstructable'.java.util.Iterator<? extends java.lang.String>
iterateIdentity()
Method iterateIdentity.java.util.Iterator<? extends NamedNativeQuery>
iterateNamedNativeQuery()
Method iterateNamedNativeQuery.java.util.Iterator<? extends NamedQuery>
iterateNamedQuery()
Method iterateNamedQuery.void
marshal(java.io.Writer out)
void
marshal(org.xml.sax.ContentHandler handler)
void
removeAllIdentity()
void
removeAllNamedNativeQuery()
void
removeAllNamedQuery()
boolean
removeIdentity(java.lang.String vIdentity)
Method removeIdentity.java.lang.String
removeIdentityAt(int index)
Method removeIdentityAt.boolean
removeNamedNativeQuery(NamedNativeQuery vNamedNativeQuery)
Method removeNamedNativeQuery.NamedNativeQuery
removeNamedNativeQueryAt(int index)
Method removeNamedNativeQueryAt.boolean
removeNamedQuery(NamedQuery vNamedQuery)
Method removeNamedQuery.NamedQuery
removeNamedQueryAt(int index)
Method removeNamedQueryAt.void
setAccess(ClassMappingAccessType access)
Sets the value of field 'access'.void
setAutoComplete(boolean autoComplete)
Sets the value of field 'autoComplete'.void
setCacheTypeMapping(CacheTypeMapping cacheTypeMapping)
Sets the value of field 'cacheTypeMapping'.void
setClassChoice(ClassChoice classChoice)
Sets the value of field 'classChoice'.void
setDepends(java.lang.Object depends)
Sets the value of field 'depends'.void
setDescription(java.lang.String description)
Sets the value of field 'description'.void
setExtends(java.lang.Object _extends)
Sets the value of field 'extends'.void
setIdentity(int index, java.lang.String vIdentity)
void
setIdentity(java.lang.String[] vIdentityArray)
void
setKeyGenerator(java.lang.String keyGenerator)
Sets the value of field 'keyGenerator'.void
setMapTo(MapTo mapTo)
Sets the value of field 'mapTo'.void
setName(java.lang.String name)
Sets the value of field 'name'.void
setNamedNativeQuery(int index, NamedNativeQuery vNamedNativeQuery)
void
setNamedNativeQuery(NamedNativeQuery[] vNamedNativeQueryArray)
void
setNamedQuery(int index, NamedQuery vNamedQuery)
void
setNamedQuery(NamedQuery[] vNamedQueryArray)
void
setVerifyConstructable(boolean verifyConstructable)
Sets the value of field 'verifyConstructable'.void
setVersion(java.lang.String version)
Sets the value of field 'version'.static ClassMapping
unmarshal(java.io.Reader reader)
Method unmarshal.void
validate()
-
-
-
Method Detail
-
addIdentity
public void addIdentity(java.lang.String vIdentity) throws java.lang.IndexOutOfBoundsException
- Parameters:
vIdentity
-- Throws:
java.lang.IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
addIdentity
public void addIdentity(int index, java.lang.String vIdentity) throws java.lang.IndexOutOfBoundsException
- Parameters:
index
-vIdentity
-- Throws:
java.lang.IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
addNamedNativeQuery
public void addNamedNativeQuery(NamedNativeQuery vNamedNativeQuery) throws java.lang.IndexOutOfBoundsException
- Parameters:
vNamedNativeQuery
-- Throws:
java.lang.IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
addNamedNativeQuery
public void addNamedNativeQuery(int index, NamedNativeQuery vNamedNativeQuery) throws java.lang.IndexOutOfBoundsException
- Parameters:
index
-vNamedNativeQuery
-- Throws:
java.lang.IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
addNamedQuery
public void addNamedQuery(NamedQuery vNamedQuery) throws java.lang.IndexOutOfBoundsException
- Parameters:
vNamedQuery
-- Throws:
java.lang.IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
addNamedQuery
public void addNamedQuery(int index, NamedQuery vNamedQuery) throws java.lang.IndexOutOfBoundsException
- Parameters:
index
-vNamedQuery
-- Throws:
java.lang.IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
deleteAutoComplete
public void deleteAutoComplete()
-
deleteVerifyConstructable
public void deleteVerifyConstructable()
-
enumerateIdentity
public java.util.Enumeration<? extends java.lang.String> enumerateIdentity()
Method enumerateIdentity.- Returns:
- an Enumeration over all possible elements of this collection
-
enumerateNamedNativeQuery
public java.util.Enumeration<? extends NamedNativeQuery> enumerateNamedNativeQuery()
Method enumerateNamedNativeQuery.- Returns:
- an Enumeration over all possible elements of this collection
-
enumerateNamedQuery
public java.util.Enumeration<? extends NamedQuery> enumerateNamedQuery()
Method enumerateNamedQuery.- Returns:
- an Enumeration over all possible elements of this collection
-
getAccess
public ClassMappingAccessType 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
public CacheTypeMapping getCacheTypeMapping()
Returns the value of field 'cacheTypeMapping'.- Returns:
- the value of field 'CacheTypeMapping'.
-
getClassChoice
public ClassChoice getClassChoice()
Returns the value of field 'classChoice'.- Returns:
- the value of field 'ClassChoice'.
-
getDepends
public java.lang.Object 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
public java.lang.String getDescription()
Returns the value of field 'description'.- Returns:
- the value of field 'Description'.
-
getExtends
public java.lang.Object 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
public java.lang.String getIdentity(int index) throws java.lang.IndexOutOfBoundsException
Method getIdentity.- Parameters:
index
-- Returns:
- the value of the java.lang.String at the given index
- Throws:
java.lang.IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
getIdentity
public java.lang.String[] 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
public java.lang.String getKeyGenerator()
Returns the value of field 'keyGenerator'.- Returns:
- the value of field 'KeyGenerator'.
-
getMapTo
public MapTo 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
public java.lang.String 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
public NamedNativeQuery getNamedNativeQuery(int index) throws java.lang.IndexOutOfBoundsException
Method getNamedNativeQuery.- Parameters:
index
-- Returns:
- the value of the org.exolab.castor.mapping.xml.NamedNativeQuery at the given index
- Throws:
java.lang.IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
getNamedNativeQuery
public NamedNativeQuery[] 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
public NamedQuery getNamedQuery(int index) throws java.lang.IndexOutOfBoundsException
Method getNamedQuery.- Parameters:
index
-- Returns:
- the value of the org.exolab.castor.mapping.xml.NamedQuery at the given index
- Throws:
java.lang.IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
getNamedQuery
public NamedQuery[] 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
public java.lang.String 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
public java.util.Iterator<? extends java.lang.String> iterateIdentity()
Method iterateIdentity.- Returns:
- an Iterator over all possible elements in this collection
-
iterateNamedNativeQuery
public java.util.Iterator<? extends NamedNativeQuery> iterateNamedNativeQuery()
Method iterateNamedNativeQuery.- Returns:
- an Iterator over all possible elements in this collection
-
iterateNamedQuery
public java.util.Iterator<? extends NamedQuery> iterateNamedQuery()
Method iterateNamedQuery.- Returns:
- an Iterator over all possible elements in this collection
-
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
-
removeAllIdentity
public void removeAllIdentity()
-
removeAllNamedNativeQuery
public void removeAllNamedNativeQuery()
-
removeAllNamedQuery
public void removeAllNamedQuery()
-
removeIdentity
public boolean removeIdentity(java.lang.String vIdentity)
Method removeIdentity.- Parameters:
vIdentity
-- Returns:
- true if the object was removed from the collection.
-
removeIdentityAt
public java.lang.String removeIdentityAt(int index)
Method removeIdentityAt.- Parameters:
index
-- Returns:
- the element removed from the collection
-
removeNamedNativeQuery
public boolean removeNamedNativeQuery(NamedNativeQuery vNamedNativeQuery)
Method removeNamedNativeQuery.- Parameters:
vNamedNativeQuery
-- Returns:
- true if the object was removed from the collection.
-
removeNamedNativeQueryAt
public NamedNativeQuery removeNamedNativeQueryAt(int index)
Method removeNamedNativeQueryAt.- Parameters:
index
-- Returns:
- the element removed from the collection
-
removeNamedQuery
public boolean removeNamedQuery(NamedQuery vNamedQuery)
Method removeNamedQuery.- Parameters:
vNamedQuery
-- Returns:
- true if the object was removed from the collection.
-
removeNamedQueryAt
public NamedQuery removeNamedQueryAt(int index)
Method removeNamedQueryAt.- Parameters:
index
-- Returns:
- the element removed from the collection
-
setAccess
public void setAccess(ClassMappingAccessType access)
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
public void setCacheTypeMapping(CacheTypeMapping cacheTypeMapping)
Sets the value of field 'cacheTypeMapping'.- Parameters:
cacheTypeMapping
- the value of field 'cacheTypeMapping'
-
setClassChoice
public void setClassChoice(ClassChoice classChoice)
Sets the value of field 'classChoice'.- Parameters:
classChoice
- the value of field 'classChoice'.
-
setDepends
public void setDepends(java.lang.Object depends)
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
public void setDescription(java.lang.String description)
Sets the value of field 'description'.- Parameters:
description
- the value of field 'description'.
-
setExtends
public void setExtends(java.lang.Object _extends)
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
public void setIdentity(int index, java.lang.String vIdentity) throws java.lang.IndexOutOfBoundsException
- Parameters:
index
-vIdentity
-- Throws:
java.lang.IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
setIdentity
public void setIdentity(java.lang.String[] vIdentityArray)
- Parameters:
vIdentityArray
-
-
setKeyGenerator
public void setKeyGenerator(java.lang.String keyGenerator)
Sets the value of field 'keyGenerator'.- Parameters:
keyGenerator
- the value of field 'keyGenerator'.
-
setMapTo
public void setMapTo(MapTo mapTo)
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
public void setName(java.lang.String name)
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 java.lang.IndexOutOfBoundsException
- Parameters:
index
-vNamedNativeQuery
-- Throws:
java.lang.IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
setNamedNativeQuery
public void setNamedNativeQuery(NamedNativeQuery[] vNamedNativeQueryArray)
- Parameters:
vNamedNativeQueryArray
-
-
setNamedQuery
public void setNamedQuery(int index, NamedQuery vNamedQuery) throws java.lang.IndexOutOfBoundsException
- Parameters:
index
-vNamedQuery
-- Throws:
java.lang.IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
setNamedQuery
public void setNamedQuery(NamedQuery[] vNamedQueryArray)
- Parameters:
vNamedQueryArray
-
-
setVerifyConstructable
public void setVerifyConstructable(boolean verifyConstructable)
Sets the value of field 'verifyConstructable'.- Parameters:
verifyConstructable
- the value of field 'verifyConstructable'.
-
setVersion
public void setVersion(java.lang.String version)
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
public static ClassMapping unmarshal(java.io.Reader reader) throws MarshalException, ValidationException
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
public void validate() throws ValidationException
- Throws:
ValidationException
- if this object is an invalid instance according to the schema
-
-