org.jconfig.handler
Class JDBCHandler
java.lang.Object
|
+--org.jconfig.handler.JDBCHandler
- All Implemented Interfaces:
- ConfigurationHandler
- public class JDBCHandler
- extends java.lang.Object
- implements ConfigurationHandler
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
- Author:
- Andreas Mecky , Terry Dye , Ralf Haemmerlin
Method Summary |
protected java.sql.Connection |
JDBCLogin()
|
Configuration |
load(java.lang.String configurationName)
This method loads a configuration 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 |
JDBCHandler
public JDBCHandler()
load
public Configuration load(java.lang.String configurationName)
throws ConfigurationManagerException
- Description copied from interface:
ConfigurationHandler
- This method loads a configuration and returns it
- Specified by:
load
in interface ConfigurationHandler
JDBCLogin
protected java.sql.Connection JDBCLogin()
throws ConfigurationManagerException
store
public void store(Configuration configuration)
throws ConfigurationManagerException
- Description copied from interface:
ConfigurationHandler
- This method should store all categories and properties.
- Specified by:
store
in interface ConfigurationHandler
- Following copied from interface:
org.jconfig.handler.ConfigurationHandler
- Throws:
ConfigurationManagerException
-
Copyright © 2001-2003 Andreas Mecky, Terry Dye. All Rights Reserved.