org.castor.jdo.conf
Class JdoConf

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

public class JdoConf
extends Object
implements Serializable

Class JdoConf.

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

Constructor Summary
JdoConf()
           
 
Method Summary
 void addDatabase(Database vDatabase)
           
 void addDatabase(int index, Database vDatabase)
           
 Enumeration<? extends Database> enumerateDatabase()
          Method enumerateDatabase.
 Database[] getDatabase()
          Method getDatabase.Returns the contents of the collection in an Array.
 Database getDatabase(int index)
          Method getDatabase.
 int getDatabaseCount()
          Method getDatabaseCount.
 String getName()
          Returns the value of field 'name'.
 TransactionDemarcation getTransactionDemarcation()
          Returns the value of field 'transactionDemarcation'.
 boolean isValid()
          Method isValid.
 Iterator<? extends Database> iterateDatabase()
          Method iterateDatabase.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void removeAllDatabase()
           
 boolean removeDatabase(Database vDatabase)
          Method removeDatabase.
 Database removeDatabaseAt(int index)
          Method removeDatabaseAt.
 void setDatabase(Database[] vDatabaseArray)
           
 void setDatabase(int index, Database vDatabase)
           
 void setName(String name)
          Sets the value of field 'name'.
 void setTransactionDemarcation(TransactionDemarcation transactionDemarcation)
          Sets the value of field 'transactionDemarcation'.
static JdoConf 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

JdoConf

public JdoConf()
Method Detail

addDatabase

public void addDatabase(Database vDatabase)
                 throws IndexOutOfBoundsException
Parameters:
vDatabase -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addDatabase

public void addDatabase(int index,
                        Database vDatabase)
                 throws IndexOutOfBoundsException
Parameters:
index -
vDatabase -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

enumerateDatabase

public Enumeration<? extends Database> enumerateDatabase()
Method enumerateDatabase.

Returns:
an Enumeration over all possible elements of this collection

getDatabase

public Database getDatabase(int index)
                     throws IndexOutOfBoundsException
Method getDatabase.

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

getDatabase

public Database[] getDatabase()
Method getDatabase.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

getDatabaseCount

public int getDatabaseCount()
Method getDatabaseCount.

Returns:
the size of this collection

getName

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

Returns:
the value of field 'Name'.

getTransactionDemarcation

public TransactionDemarcation getTransactionDemarcation()
Returns the value of field 'transactionDemarcation'.

Returns:
the value of field 'TransactionDemarcation'.

isValid

public boolean isValid()
Method isValid.

Returns:
true if this object is valid according to the schema

iterateDatabase

public Iterator<? extends Database> iterateDatabase()
Method iterateDatabase.

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

removeAllDatabase

public void removeAllDatabase()

removeDatabase

public boolean removeDatabase(Database vDatabase)
Method removeDatabase.

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

removeDatabaseAt

public Database removeDatabaseAt(int index)
Method removeDatabaseAt.

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

setDatabase

public void setDatabase(int index,
                        Database vDatabase)
                 throws IndexOutOfBoundsException
Parameters:
index -
vDatabase -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setDatabase

public void setDatabase(Database[] vDatabaseArray)
Parameters:
vDatabaseArray -

setName

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

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

setTransactionDemarcation

public void setTransactionDemarcation(TransactionDemarcation transactionDemarcation)
Sets the value of field 'transactionDemarcation'.

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

unmarshal

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

Parameters:
reader -
Returns:
the unmarshaled org.castor.jdo.conf.JdoConf
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 © 2010. All Rights Reserved.