org.castor.jdo.conf
Class Database

java.lang.Object
  extended by org.castor.jdo.conf.Database
All Implemented Interfaces:
Serializable

public class Database
extends Object
implements Serializable

Class Database.

Version:
$Revision$ $Date$
See Also:
Serialized Form

Constructor Summary
Database()
           
 
Method Summary
 void addClassMapping(ClassMapping vClassMapping)
           
 void addClassMapping(int index, ClassMapping vClassMapping)
           
 void addMapping(int index, Mapping vMapping)
           
 void addMapping(Mapping vMapping)
           
 void addPackageMapping(int index, PackageMapping vPackageMapping)
           
 void addPackageMapping(PackageMapping vPackageMapping)
           
 Enumeration<? extends ClassMapping> enumerateClassMapping()
          Method enumerateClassMapping.
 Enumeration<? extends Mapping> enumerateMapping()
          Method enumerateMapping.
 Enumeration<? extends PackageMapping> enumeratePackageMapping()
          Method enumeratePackageMapping.
 ClassMapping[] getClassMapping()
          Method getClassMapping.Returns the contents of the collection in an Array.
 ClassMapping getClassMapping(int index)
          Method getClassMapping.
 int getClassMappingCount()
          Method getClassMappingCount.
 DatabaseChoice getDatabaseChoice()
          Returns the value of field 'databaseChoice'.
 String getEngine()
          Returns the value of field 'engine'.
 Mapping[] getMapping()
          Method getMapping.Returns the contents of the collection in an Array.
 Mapping getMapping(int index)
          Method getMapping.
 int getMappingCount()
          Method getMappingCount.
 String getName()
          Returns the value of field 'name'.
 PackageMapping[] getPackageMapping()
          Method getPackageMapping.Returns the contents of the collection in an Array.
 PackageMapping getPackageMapping(int index)
          Method getPackageMapping.
 int getPackageMappingCount()
          Method getPackageMappingCount.
 boolean isValid()
          Method isValid.
 Iterator<? extends ClassMapping> iterateClassMapping()
          Method iterateClassMapping.
 Iterator<? extends Mapping> iterateMapping()
          Method iterateMapping.
 Iterator<? extends PackageMapping> iteratePackageMapping()
          Method iteratePackageMapping.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void removeAllClassMapping()
           
 void removeAllMapping()
           
 void removeAllPackageMapping()
           
 boolean removeClassMapping(ClassMapping vClassMapping)
          Method removeClassMapping.
 ClassMapping removeClassMappingAt(int index)
          Method removeClassMappingAt.
 boolean removeMapping(Mapping vMapping)
          Method removeMapping.
 Mapping removeMappingAt(int index)
          Method removeMappingAt.
 boolean removePackageMapping(PackageMapping vPackageMapping)
          Method removePackageMapping.
 PackageMapping removePackageMappingAt(int index)
          Method removePackageMappingAt.
 void setClassMapping(ClassMapping[] vClassMappingArray)
           
 void setClassMapping(int index, ClassMapping vClassMapping)
           
 void setDatabaseChoice(DatabaseChoice databaseChoice)
          Sets the value of field 'databaseChoice'.
 void setEngine(String engine)
          Sets the value of field 'engine'.
 void setMapping(int index, Mapping vMapping)
           
 void setMapping(Mapping[] vMappingArray)
           
 void setName(String name)
          Sets the value of field 'name'.
 void setPackageMapping(int index, PackageMapping vPackageMapping)
           
 void setPackageMapping(PackageMapping[] vPackageMappingArray)
           
static Database unmarshal(Reader reader)
          Method unmarshal.
 void validate()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Database

public Database()
Method Detail

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

addMapping

public void addMapping(Mapping vMapping)
                throws IndexOutOfBoundsException
Parameters:
vMapping -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addMapping

public void addMapping(int index,
                       Mapping vMapping)
                throws IndexOutOfBoundsException
Parameters:
index -
vMapping -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addPackageMapping

public void addPackageMapping(PackageMapping vPackageMapping)
                       throws IndexOutOfBoundsException
Parameters:
vPackageMapping -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addPackageMapping

public void addPackageMapping(int index,
                              PackageMapping vPackageMapping)
                       throws IndexOutOfBoundsException
Parameters:
index -
vPackageMapping -
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

enumerateMapping

public Enumeration<? extends Mapping> enumerateMapping()
Method enumerateMapping.

Returns:
an Enumeration over all possible elements of this collection

enumeratePackageMapping

public Enumeration<? extends PackageMapping> enumeratePackageMapping()
Method enumeratePackageMapping.

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.castor.jdo.conf.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

getDatabaseChoice

public DatabaseChoice getDatabaseChoice()
Returns the value of field 'databaseChoice'.

Returns:
the value of field 'DatabaseChoice'.

getEngine

public String getEngine()
Returns the value of field 'engine'.

Returns:
the value of field 'Engine'.

getMapping

public Mapping getMapping(int index)
                   throws IndexOutOfBoundsException
Method getMapping.

Parameters:
index -
Returns:
the value of the org.castor.jdo.conf.Mapping at the given index
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

getMapping

public Mapping[] getMapping()
Method getMapping.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

getMappingCount

public int getMappingCount()
Method getMappingCount.

Returns:
the size of this collection

getName

public String getName()
Returns the value of field 'name'.

Returns:
the value of field 'Name'.

getPackageMapping

public PackageMapping getPackageMapping(int index)
                                 throws IndexOutOfBoundsException
Method getPackageMapping.

Parameters:
index -
Returns:
the value of the org.castor.jdo.conf.PackageMapping at the given index
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

getPackageMapping

public PackageMapping[] getPackageMapping()
Method getPackageMapping.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

getPackageMappingCount

public int getPackageMappingCount()
Method getPackageMappingCount.

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

iterateMapping

public Iterator<? extends Mapping> iterateMapping()
Method iterateMapping.

Returns:
an Iterator over all possible elements in this collection

iteratePackageMapping

public Iterator<? extends PackageMapping> iteratePackageMapping()
Method iteratePackageMapping.

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()

removeAllMapping

public void removeAllMapping()

removeAllPackageMapping

public void removeAllPackageMapping()

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

removeMapping

public boolean removeMapping(Mapping vMapping)
Method removeMapping.

Parameters:
vMapping -
Returns:
true if the object was removed from the collection.

removeMappingAt

public Mapping removeMappingAt(int index)
Method removeMappingAt.

Parameters:
index -
Returns:
the element removed from the collection

removePackageMapping

public boolean removePackageMapping(PackageMapping vPackageMapping)
Method removePackageMapping.

Parameters:
vPackageMapping -
Returns:
true if the object was removed from the collection.

removePackageMappingAt

public PackageMapping removePackageMappingAt(int index)
Method removePackageMappingAt.

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 -

setDatabaseChoice

public void setDatabaseChoice(DatabaseChoice databaseChoice)
Sets the value of field 'databaseChoice'.

Parameters:
databaseChoice - the value of field 'databaseChoice'.

setEngine

public void setEngine(String engine)
Sets the value of field 'engine'.

Parameters:
engine - the value of field 'engine'.

setMapping

public void setMapping(int index,
                       Mapping vMapping)
                throws IndexOutOfBoundsException
Parameters:
index -
vMapping -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setMapping

public void setMapping(Mapping[] vMappingArray)
Parameters:
vMappingArray -

setName

public void setName(String name)
Sets the value of field 'name'.

Parameters:
name - the value of field 'name'.

setPackageMapping

public void setPackageMapping(int index,
                              PackageMapping vPackageMapping)
                       throws IndexOutOfBoundsException
Parameters:
index -
vPackageMapping -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setPackageMapping

public void setPackageMapping(PackageMapping[] vPackageMappingArray)
Parameters:
vPackageMappingArray -

unmarshal

public static Database unmarshal(Reader reader)
                          throws MarshalException,
                                 ValidationException
Method unmarshal.

Parameters:
reader -
Returns:
the unmarshaled org.castor.jdo.conf.Database
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


Copyright © 2012. All Rights Reserved.