| java.lang.Object org.jaffa.persistence.engines.jdbcengine.configservice.ConfigurationService
ConfigurationService | public class ConfigurationService (Code) | | This class implements the Singleton pattern. Use the getInstance() method to get an instance of this class.
The Configuration Service reads the init.xml file. It then performs the initializations.
This class caches the ClassMetaData objects.
It also maintains all the Database objects.
|
Method Summary | |
public Database | getDatabase(String name) Returns a Database object for the database name, as defined in the init file.
Parameters: name - The database name. | public Map | getDatabases() Returns a Map of Database objects, keyed by database name, as defined in the init file. | public static ConfigurationService | getInstance() Creates an instance of ConfigurationService, if not already instantiated. | public ClassMetaData | getMetaData(String classname) This tries to locate the mapping file for the input classname through the list of locations as defined in the init file.
It will create a ClassMetaData object & cache it.
It throws the runtime exception ConfigurationServiceRuntimeException, if the the mapping file could not be located.
It throws the runtime exception ClassMetaDataValidationRuntimeException, if the mapping file and the corresponding class have mismatches.
Parameters: classname - The class for which the mapping file is going to be parsed. |
getDatabase | public Database getDatabase(String name)(Code) | | Returns a Database object for the database name, as defined in the init file.
Parameters: name - The database name. a Database object. A null will be returned, in case the name was not defined in the init file. |
getDatabases | public Map getDatabases()(Code) | | Returns a Map of Database objects, keyed by database name, as defined in the init file.
a Map of Database objects, keyed by database name, as defined in the init file. |
getInstance | public static ConfigurationService getInstance()(Code) | | Creates an instance of ConfigurationService, if not already instantiated.
This gets the location of the init.xml (relative to the classpath) from the framework.properties file.
An instance of the ConfigurationService. |
getMetaData | public ClassMetaData getMetaData(String classname)(Code) | | This tries to locate the mapping file for the input classname through the list of locations as defined in the init file.
It will create a ClassMetaData object & cache it.
It throws the runtime exception ConfigurationServiceRuntimeException, if the the mapping file could not be located.
It throws the runtime exception ClassMetaDataValidationRuntimeException, if the mapping file and the corresponding class have mismatches.
Parameters: classname - The class for which the mapping file is going to be parsed. a ClassMetaData object. |
|
|