org.rimudb.configuration
Class DatabaseConfigurationLoader

java.lang.Object
  extended by org.rimudb.configuration.DatabaseConfigurationLoader

public class DatabaseConfigurationLoader
extends java.lang.Object

This class is responsible for taking the document that has been loaded and parsed and converting it to an array of DatabaseConfigurations.

Author:
Simon Ritchie

Constructor Summary
DatabaseConfigurationLoader(java.lang.String filename, org.w3c.dom.Document document, java.lang.String validatedAgainstSchema)
           
 
Method Summary
 DatabaseConfiguration getDatabaseConfiguration(java.lang.String databaseID)
           
 DatabaseConfiguration[] getDatabaseConfigurations()
          Return all the database configuration information.
 int getDatabaseCount()
          Return the number of databases found in the configuration
 java.lang.String[] getDatabaseIDsUsingClass(java.lang.Class<? extends DataObject> dataObjectClass)
          Returns an array of all the database IDs used by the given class.
 TableConfiguration[] getTableConfigurations()
          Return an array of table configurations.
 TableConfiguration[] getTableConfigurations(java.lang.String databaseID)
           
 void load()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatabaseConfigurationLoader

public DatabaseConfigurationLoader(java.lang.String filename,
                                   org.w3c.dom.Document document,
                                   java.lang.String validatedAgainstSchema)
Method Detail

load

public void load()
          throws RimuDBException
Throws:
RimuDBException

getDatabaseConfiguration

public DatabaseConfiguration getDatabaseConfiguration(java.lang.String databaseID)

getDatabaseConfigurations

public DatabaseConfiguration[] getDatabaseConfigurations()
Return all the database configuration information.

Returns:
DatabaseConfiguration[]

getDatabaseIDsUsingClass

public java.lang.String[] getDatabaseIDsUsingClass(java.lang.Class<? extends DataObject> dataObjectClass)
Returns an array of all the database IDs used by the given class. The array is empty if there are no database IDs for the class.

Parameters:
dataObjectClass - Class
Returns:
String[]

getTableConfigurations

public TableConfiguration[] getTableConfigurations()
Return an array of table configurations. These are the DataObject entries from the CompoundDatabase.xml that indicate which group the DataObject is part of, as well as locking information for the DataObject.

Returns:
TableConfiguration[]

getDatabaseCount

public int getDatabaseCount()
Return the number of databases found in the configuration

Returns:
int

getTableConfigurations

public TableConfiguration[] getTableConfigurations(java.lang.String databaseID)


Copyright © 2008-2011 Simon Ritchie. All Rights Reserved.