Class MappingRoot

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

public class MappingRoot extends Object implements Serializable
Class MappingRoot.
Version:
$Revision$ $Date$
See Also:
  • Constructor Details

    • MappingRoot

      public MappingRoot()
  • Method Details

    • addClassMapping

      public void addClassMapping(ClassMapping vClassMapping) throws IndexOutOfBoundsException
      Parameters:
      vClassMapping -
      Throws:
      IndexOutOfBoundsException - if the index given is outside the bounds of the collection
    • addClassMapping

      public void addClassMapping(int index, ClassMapping vClassMapping) throws IndexOutOfBoundsException
      Parameters:
      index -
      vClassMapping -
      Throws:
      IndexOutOfBoundsException - if the index given is outside the bounds of the collection
    • addFieldHandlerDef

      public void addFieldHandlerDef(FieldHandlerDef vFieldHandlerDef) throws IndexOutOfBoundsException
      Parameters:
      vFieldHandlerDef -
      Throws:
      IndexOutOfBoundsException - if the index given is outside the bounds of the collection
    • addFieldHandlerDef

      public void addFieldHandlerDef(int index, FieldHandlerDef vFieldHandlerDef) throws IndexOutOfBoundsException
      Parameters:
      index -
      vFieldHandlerDef -
      Throws:
      IndexOutOfBoundsException - if the index given is outside the bounds of the collection
    • addInclude

      public void addInclude(Include vInclude) throws IndexOutOfBoundsException
      Parameters:
      vInclude -
      Throws:
      IndexOutOfBoundsException - if the index given is outside the bounds of the collection
    • addInclude

      public void addInclude(int index, Include vInclude) throws IndexOutOfBoundsException
      Parameters:
      index -
      vInclude -
      Throws:
      IndexOutOfBoundsException - if the index given is outside the bounds of the collection
    • addKeyGeneratorDef

      public void addKeyGeneratorDef(KeyGeneratorDef vKeyGeneratorDef) throws IndexOutOfBoundsException
      Parameters:
      vKeyGeneratorDef -
      Throws:
      IndexOutOfBoundsException - if the index given is outside the bounds of the collection
    • addKeyGeneratorDef

      public void addKeyGeneratorDef(int index, KeyGeneratorDef vKeyGeneratorDef) throws IndexOutOfBoundsException
      Parameters:
      index -
      vKeyGeneratorDef -
      Throws:
      IndexOutOfBoundsException - if the index given is outside the bounds of the collection
    • enumerateClassMapping

      public Enumeration<? extends ClassMapping> enumerateClassMapping()
      Method enumerateClassMapping.
      Returns:
      an Enumeration over all possible elements of this collection
    • enumerateFieldHandlerDef

      public Enumeration<? extends FieldHandlerDef> enumerateFieldHandlerDef()
      Method enumerateFieldHandlerDef.
      Returns:
      an Enumeration over all possible elements of this collection
    • enumerateInclude

      public Enumeration<? extends Include> enumerateInclude()
      Method enumerateInclude.
      Returns:
      an Enumeration over all possible elements of this collection
    • enumerateKeyGeneratorDef

      public Enumeration<? extends KeyGeneratorDef> enumerateKeyGeneratorDef()
      Method enumerateKeyGeneratorDef.
      Returns:
      an Enumeration over all possible elements of this collection
    • getClassMapping

      public ClassMapping getClassMapping(int index) throws IndexOutOfBoundsException
      Method getClassMapping.
      Parameters:
      index -
      Returns:
      the value of the org.exolab.castor.mapping.xml.ClassMapping at the given index
      Throws:
      IndexOutOfBoundsException - if the index given is outside the bounds of the collection
    • getClassMapping

      public ClassMapping[] getClassMapping()
      Method getClassMapping.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
    • getClassMappingCount

      public int getClassMappingCount()
      Method getClassMappingCount.
      Returns:
      the size of this collection
    • getDescription

      public String getDescription()
      Returns the value of field 'description'.
      Returns:
      the value of field 'Description'.
    • getFieldHandlerDef

      public FieldHandlerDef getFieldHandlerDef(int index) throws IndexOutOfBoundsException
      Method getFieldHandlerDef.
      Parameters:
      index -
      Returns:
      the value of the org.exolab.castor.mapping.xml.FieldHandlerDef at the given index
      Throws:
      IndexOutOfBoundsException - if the index given is outside the bounds of the collection
    • getFieldHandlerDef

      public FieldHandlerDef[] getFieldHandlerDef()
      Method getFieldHandlerDef.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
    • getFieldHandlerDefCount

      public int getFieldHandlerDefCount()
      Method getFieldHandlerDefCount.
      Returns:
      the size of this collection
    • getInclude

      public Include getInclude(int index) throws IndexOutOfBoundsException
      Method getInclude.
      Parameters:
      index -
      Returns:
      the value of the org.exolab.castor.mapping.xml.Include at the given index
      Throws:
      IndexOutOfBoundsException - if the index given is outside the bounds of the collection
    • getInclude

      public Include[] getInclude()
      Method getInclude.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
    • getIncludeCount

      public int getIncludeCount()
      Method getIncludeCount.
      Returns:
      the size of this collection
    • getKeyGeneratorDef

      public KeyGeneratorDef getKeyGeneratorDef(int index) throws IndexOutOfBoundsException
      Method getKeyGeneratorDef.
      Parameters:
      index -
      Returns:
      the value of the org.exolab.castor.mapping.xml.KeyGeneratorDef at the given index
      Throws:
      IndexOutOfBoundsException - if the index given is outside the bounds of the collection
    • getKeyGeneratorDef

      public KeyGeneratorDef[] getKeyGeneratorDef()
      Method getKeyGeneratorDef.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
    • getKeyGeneratorDefCount

      public int getKeyGeneratorDefCount()
      Method getKeyGeneratorDefCount.
      Returns:
      the size of this collection
    • isValid

      public boolean isValid()
      Method isValid.
      Returns:
      true if this object is valid according to the schema
    • iterateClassMapping

      public Iterator<? extends ClassMapping> iterateClassMapping()
      Method iterateClassMapping.
      Returns:
      an Iterator over all possible elements in this collection
    • iterateFieldHandlerDef

      public Iterator<? extends FieldHandlerDef> iterateFieldHandlerDef()
      Method iterateFieldHandlerDef.
      Returns:
      an Iterator over all possible elements in this collection
    • iterateInclude

      public Iterator<? extends Include> iterateInclude()
      Method iterateInclude.
      Returns:
      an Iterator over all possible elements in this collection
    • iterateKeyGeneratorDef

      public Iterator<? extends KeyGeneratorDef> iterateKeyGeneratorDef()
      Method iterateKeyGeneratorDef.
      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
    • removeAllClassMapping

      public void removeAllClassMapping()
    • removeAllFieldHandlerDef

      public void removeAllFieldHandlerDef()
    • removeAllInclude

      public void removeAllInclude()
    • removeAllKeyGeneratorDef

      public void removeAllKeyGeneratorDef()
    • removeClassMapping

      public boolean removeClassMapping(ClassMapping vClassMapping)
      Method removeClassMapping.
      Parameters:
      vClassMapping -
      Returns:
      true if the object was removed from the collection.
    • removeClassMappingAt

      public ClassMapping removeClassMappingAt(int index)
      Method removeClassMappingAt.
      Parameters:
      index -
      Returns:
      the element removed from the collection
    • removeFieldHandlerDef

      public boolean removeFieldHandlerDef(FieldHandlerDef vFieldHandlerDef)
      Method removeFieldHandlerDef.
      Parameters:
      vFieldHandlerDef -
      Returns:
      true if the object was removed from the collection.
    • removeFieldHandlerDefAt

      public FieldHandlerDef removeFieldHandlerDefAt(int index)
      Method removeFieldHandlerDefAt.
      Parameters:
      index -
      Returns:
      the element removed from the collection
    • removeInclude

      public boolean removeInclude(Include vInclude)
      Method removeInclude.
      Parameters:
      vInclude -
      Returns:
      true if the object was removed from the collection.
    • removeIncludeAt

      public Include removeIncludeAt(int index)
      Method removeIncludeAt.
      Parameters:
      index -
      Returns:
      the element removed from the collection
    • removeKeyGeneratorDef

      public boolean removeKeyGeneratorDef(KeyGeneratorDef vKeyGeneratorDef)
      Method removeKeyGeneratorDef.
      Parameters:
      vKeyGeneratorDef -
      Returns:
      true if the object was removed from the collection.
    • removeKeyGeneratorDefAt

      public KeyGeneratorDef removeKeyGeneratorDefAt(int index)
      Method removeKeyGeneratorDefAt.
      Parameters:
      index -
      Returns:
      the element removed from the collection
    • setClassMapping

      public void setClassMapping(int index, ClassMapping vClassMapping) throws IndexOutOfBoundsException
      Parameters:
      index -
      vClassMapping -
      Throws:
      IndexOutOfBoundsException - if the index given is outside the bounds of the collection
    • setClassMapping

      public void setClassMapping(ClassMapping[] vClassMappingArray)
      Parameters:
      vClassMappingArray -
    • setDescription

      public void setDescription(String description)
      Sets the value of field 'description'.
      Parameters:
      description - the value of field 'description'.
    • setFieldHandlerDef

      public void setFieldHandlerDef(int index, FieldHandlerDef vFieldHandlerDef) throws IndexOutOfBoundsException
      Parameters:
      index -
      vFieldHandlerDef -
      Throws:
      IndexOutOfBoundsException - if the index given is outside the bounds of the collection
    • setFieldHandlerDef

      public void setFieldHandlerDef(FieldHandlerDef[] vFieldHandlerDefArray)
      Parameters:
      vFieldHandlerDefArray -
    • setInclude

      public void setInclude(int index, Include vInclude) throws IndexOutOfBoundsException
      Parameters:
      index -
      vInclude -
      Throws:
      IndexOutOfBoundsException - if the index given is outside the bounds of the collection
    • setInclude

      public void setInclude(Include[] vIncludeArray)
      Parameters:
      vIncludeArray -
    • setKeyGeneratorDef

      public void setKeyGeneratorDef(int index, KeyGeneratorDef vKeyGeneratorDef) throws IndexOutOfBoundsException
      Parameters:
      index -
      vKeyGeneratorDef -
      Throws:
      IndexOutOfBoundsException - if the index given is outside the bounds of the collection
    • setKeyGeneratorDef

      public void setKeyGeneratorDef(KeyGeneratorDef[] vKeyGeneratorDefArray)
      Parameters:
      vKeyGeneratorDefArray -
    • unmarshal

      public static MappingRoot unmarshal(Reader reader) throws MarshalException, ValidationException
      Method unmarshal.
      Parameters:
      reader -
      Returns:
      the unmarshaled org.exolab.castor.mapping.xml.MappingRoot
      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