|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jconfig.handler.JDBCHandler
This implementation provides the basic requirements for a JDBC Handler. The database structure is quite simple. It is a based on a Configuration table (T_CONFIGURATION), a Category table (T_CATEGORY), a Property table (T_PROPERTY) and a Variable table (T_VARIABLE). A Configuration can have 1:many Categories and 1:many Variables. A Category can have 1:many Properties. Implementation does require that the database support some sort of auto-increment for the object identifier (oid), if you want to store the Configurations. One problem with the implementation is the ability to store the variable information within the properties. This is an inherent problem with all of the ConfigurationHandlers. Following properties need to set inside of the jconfig.properties file: org.jconfig.jdbc.driver org.jconfig.jdbc.user org.jconfig.jdbc.pwd org.jconfig.jdbc.url
Constructor Summary | |
JDBCHandler()
|
Method Summary | |
protected java.sql.Connection |
JDBCLogin()
|
Configuration |
load(java.lang.String configurationName)
This method loads a configuration and returns it |
Configuration |
load(java.lang.String configurationName,
ConfigurationParser parser)
This method loads a configuration using a specific parser and returns it |
void |
store(Configuration configuration)
This method should store all categories and properties. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JDBCHandler()
Method Detail |
public Configuration load(java.lang.String configurationName) throws ConfigurationManagerException
ConfigurationHandler
load
in interface ConfigurationHandler
configurationName
- the name of the configuration
ConfigurationManagerException
protected java.sql.Connection JDBCLogin() throws ConfigurationManagerException
ConfigurationManagerException
public void store(Configuration configuration) throws ConfigurationManagerException
ConfigurationHandler
store
in interface ConfigurationHandler
configuration
- the Configuration that should be saved
ConfigurationManagerException
public Configuration load(java.lang.String configurationName, ConfigurationParser parser) throws ConfigurationManagerException
ConfigurationHandler
load
in interface ConfigurationHandler
configurationName
- the name of the configurationparser
- the parser that should be used
ConfigurationManagerException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |