|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.naftulin.configmgr.content.AbstractRecordImpl org.naftulin.configmgr.content.DbDirectRecordImpl
public class DbDirectRecordImpl
Represents a db direct entry, with it's key, name-value pairs and parser class. Intended to mirror master configuration rules for external configuration. The external configuraton xml is:
<dbdirect key="the key" driverClass="database driver class" connectionURl="database connection url" sql="sql that selects at least key and value columns from any table(s) or view with any static where condition" user="user name to login to db if any" password="password for the user if any" keyColumnName="column name where the key is selected" valueColumnName="column name where the value is selected" > <param name="key1" value="value1" /> ..... <param name="keyn" value="valuen" /> </dbdirect>
Constructor Summary | |
---|---|
DbDirectRecordImpl()
|
Method Summary | |
---|---|
void |
addNameValuePair(NameValuePairImpl nv)
Adds a name-value pair as it is read from the master configuration. |
java.lang.String |
getConnectionUrl()
|
java.lang.String |
getDriverClass()
|
java.lang.String |
getFileName()
Returns the file name associated with the record. |
java.lang.String |
getKeyColumnName()
|
java.util.List<NameValuePairImpl> |
getNameValuePairs()
|
ConfigEntryParser |
getParser()
Returns a database parser instance. |
java.lang.String |
getPassword()
|
java.lang.String |
getSql()
|
java.lang.String |
getUser()
|
java.lang.String |
getValueColumnName()
|
boolean |
isGetUrlForFile()
Since it is not a file-based cofiguration, we need to overwrite the method. |
void |
setConnectionUrl(java.lang.String connectionUrl)
|
void |
setDriverClass(java.lang.String driverClass)
|
void |
setKeyColumnName(java.lang.String keyColumnName)
|
void |
setPassword(java.lang.String password)
|
void |
setSql(java.lang.String sql)
|
void |
setUser(java.lang.String user)
|
void |
setValueColumnName(java.lang.String valueColumnName)
|
Methods inherited from class org.naftulin.configmgr.content.AbstractRecordImpl |
---|
getKey, setFileName, setKey, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DbDirectRecordImpl()
Method Detail |
---|
public java.lang.String getDriverClass()
public void setDriverClass(java.lang.String driverClass)
public java.lang.String getKeyColumnName()
public void setKeyColumnName(java.lang.String keyColumnName)
public java.util.List<NameValuePairImpl> getNameValuePairs()
public void addNameValuePair(NameValuePairImpl nv)
nv
- the name value pair.public java.lang.String getPassword()
public void setPassword(java.lang.String password)
public java.lang.String getSql()
public void setSql(java.lang.String sql)
public java.lang.String getUser()
public void setUser(java.lang.String user)
public java.lang.String getValueColumnName()
public void setValueColumnName(java.lang.String valueColumnName)
public ConfigEntryParser getParser() throws ConfigurationManagerException
getParser
in class AbstractRecordImpl
ConfigurationManagerException
- if an error occured while instantiating the parser.public java.lang.String getConnectionUrl()
public void setConnectionUrl(java.lang.String connectionUrl)
public boolean isGetUrlForFile()
isGetUrlForFile
in class AbstractRecordImpl
public java.lang.String getFileName()
AbstractRecordImpl
getFileName
in class AbstractRecordImpl
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |