Class ClassMapping

java.lang.Object
org.exolab.castor.mapping.xml.ClassMapping
All Implemented Interfaces:
Serializable

public class ClassMapping extends Object implements Serializable
The 'class' element is used to store information about mapping of a class.
Version:
$Revision$ $Date$
See Also:
  • Constructor Details

    • ClassMapping

      public ClassMapping()
  • Method Details

    • addIdentity

      public void addIdentity(String vIdentity) throws IndexOutOfBoundsException
      Parameters:
      vIdentity -
      Throws:
      IndexOutOfBoundsException - if the index given is outside the bounds of the collection
    • addIdentity

      public void addIdentity(int index, String vIdentity) throws IndexOutOfBoundsException
      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

      public void addNamedQuery(NamedQuery vNamedQuery) throws IndexOutOfBoundsException
      Parameters:
      vNamedQuery -
      Throws:
      IndexOutOfBoundsException - if the index given is outside the bounds of the collection
    • addNamedQuery

      public void addNamedQuery(int index, NamedQuery vNamedQuery) throws IndexOutOfBoundsException
      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

      public Enumeration<? extends String> enumerateIdentity()
      Method enumerateIdentity.
      Returns:
      an Enumeration over all possible elements of this collection
    • enumerateNamedNativeQuery

      public Enumeration<? extends NamedNativeQuery> enumerateNamedNativeQuery()
      Method enumerateNamedNativeQuery.
      Returns:
      an Enumeration over all possible elements of this collection
    • enumerateNamedQuery

      public 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 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 String getDescription()
      Returns the value of field 'description'.
      Returns:
      the value of field 'Description'.
    • getExtends

      public 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 String getIdentity(int index) throws IndexOutOfBoundsException
      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

      public 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 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 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 IndexOutOfBoundsException
      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

      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 IndexOutOfBoundsException
      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

      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 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 Iterator<? extends String> iterateIdentity()
      Method iterateIdentity.
      Returns:
      an Iterator over all possible elements in this collection
    • iterateNamedNativeQuery

      public Iterator<? extends NamedNativeQuery> iterateNamedNativeQuery()
      Method iterateNamedNativeQuery.
      Returns:
      an Iterator over all possible elements in this collection
    • iterateNamedQuery

      public Iterator<? extends NamedQuery> iterateNamedQuery()
      Method iterateNamedQuery.
      Returns:
      an Iterator over all possible elements in this collection
    • marshal

      public void marshal(Writer out) throws MarshalException, ValidationException
      Parameters:
      out -
      Throws:
      MarshalException - if object is null or if any SAXException is thrown during marshaling
      ValidationException - 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 marshaling
      ValidationException - if this object is an invalid instance according to the schema
      MarshalException - 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(String vIdentity)
      Method removeIdentity.
      Parameters:
      vIdentity -
      Returns:
      true if the object was removed from the collection.
    • removeIdentityAt

      public 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(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(String description)
      Sets the value of field 'description'.
      Parameters:
      description - the value of field 'description'.
    • setExtends

      public void setExtends(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, String vIdentity) throws IndexOutOfBoundsException
      Parameters:
      index -
      vIdentity -
      Throws:
      IndexOutOfBoundsException - if the index given is outside the bounds of the collection
    • setIdentity

      public void setIdentity(String[] vIdentityArray)
      Parameters:
      vIdentityArray -
    • setKeyGenerator

      public void setKeyGenerator(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(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 IndexOutOfBoundsException
      Parameters:
      index -
      vNamedNativeQuery -
      Throws:
      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 IndexOutOfBoundsException
      Parameters:
      index -
      vNamedQuery -
      Throws:
      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(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(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 marshaling
      ValidationException - 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