|
SRJRCFrames v0.1.296 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jgoodies.binding.beans.Model de.schwarzrot.data.support.AbstractEntity de.schwarzrot.app.config.support.AbstractConfigBase de.schwarzrot.app.config.ApplicationConfig de.schwarzrot.app.config.support.AbstractSysConfig
public abstract class AbstractSysConfig
configuration base class for database clients. All properties are supposed to be system properties
Constructor Summary | |
---|---|
AbstractSysConfig()
|
|
AbstractSysConfig(AbstractSysConfig other)
|
Method Summary | |
---|---|
void |
dump()
|
String |
getDbType()
returns the type of a data storage. |
Map<String,DriveMapping> |
getDriveMappings()
|
String |
getDrvClassName()
returns the classname of the JDBC driver |
File |
getDrvLibPath()
returns the path of the jar-file that contains a jdbc-driver |
String |
getDrvUrl()
returns the url used by the JDBC driver to access a data storage |
String |
getDsDB()
returns the name of a data storage |
String |
getDsHost()
returns the hostname of the data storage server |
String |
getDsPassword()
returns the password used to access a data storage |
String |
getDsSchema()
SRJRCFrames supports database schema usage even on databases, that don't support schemata. |
String |
getDsUser()
returns the username used to access a data storage |
Map<String,String> |
getMappings()
returns a map with mappings of logical property names to physical property names (column names in database terms). |
String |
getPluginDir()
|
Map<String,Integer> |
getSkipList()
startupSize and startupPosition are virtual properties, which are calculated at first access. |
Map<String,Boolean> |
getSupportedDBDrivers()
|
List<String> |
getUserAttributes()
return a list of properties, that are user attributes. |
void |
getValuesFrom(DBConfig other)
|
boolean |
isSetupNeeded()
|
void |
setDbType(String dbType)
sets the type of the database (currently only mysql supported) |
void |
setDriveMappings(Map<String,DriveMapping> m)
|
void |
setDrvClassName(String drvClassName)
sets the classname of the JDBC-driver |
void |
setDrvLibPath(File drvLibPath)
|
void |
setDrvUrl(String url)
sets the url to access the data storage |
void |
setDsDB(String dsDB)
sets the name of the data storage, i.e. the name of a database |
void |
setDsHost(String dsHost)
sets the hostname of the server, that hosts the data storage |
void |
setDsPassword(String dsPassword)
sets the password used to access the data storage |
void |
setDsSchema(String dsSchema)
sets the default schema used by applications. |
void |
setDsUser(String dsUser)
sets the user used to access the data storage |
void |
setMappings(Collection<DriveMapping> list)
|
void |
setPluginDir(String pluginDir)
|
void |
setSetupNeeded(boolean setupNeeded)
|
Methods inherited from class de.schwarzrot.app.config.ApplicationConfig |
---|
getArchive, getExtraTBOrientation, getStartupHeight, getStartupPosition, getStartupSize, getStartupWidth, getStartupX, getStartupY, getVersion, setArchive, setExtraTBOrientation, setStartupHeight, setStartupPosition, setStartupSize, setStartupWidth, setStartupX, setStartupY, setVersion, validate |
Methods inherited from class de.schwarzrot.app.config.support.AbstractConfigBase |
---|
getPersistenceName, getSystemClass, isUserType |
Methods inherited from class de.schwarzrot.data.support.AbstractEntity |
---|
adoptChildren, adoptChildren, adoptGroupedChildren, compareTo, equals, getCModified, getCode, getDefaultOrder, getDtCreated, getDtModified, getId, getLogger, getSchemaName, getUCreated, getUModified, getUniqColumnNames, getVariantColumnName, getVariantTypeMap, hashCode, isDirty, isVirtual, setCModified, setDirty, setDtCreated, setDtModified, setId, setSchemaName, setUCreated, setUModified, toString |
Methods inherited from class com.jgoodies.binding.beans.Model |
---|
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, equals, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, fireMultiplePropertiesChanged, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.jgoodies.binding.beans.Observable |
---|
addPropertyChangeListener, removePropertyChangeListener |
Constructor Detail |
---|
public AbstractSysConfig()
public AbstractSysConfig(AbstractSysConfig other)
Method Detail |
---|
public void dump()
public String getDbType()
DBConfig
getDbType
in interface DBConfig
public final Map<String,DriveMapping> getDriveMappings()
public final String getDrvClassName()
DBConfig
getDrvClassName
in interface DBConfig
public final File getDrvLibPath()
DBConfig
getDrvLibPath
in interface DBConfig
public String getDrvUrl()
DBConfig
getDrvUrl
in interface DBConfig
public final String getDsDB()
DBConfig
getDsDB
in interface DBConfig
public final String getDsHost()
DBConfig
getDsHost
in interface DBConfig
public final String getDsPassword()
DBConfig
getDsPassword
in interface DBConfig
public final String getDsSchema()
DBConfig
getDsSchema
in interface DBConfig
public final String getDsUser()
DBConfig
getDsUser
in interface DBConfig
public Map<String,String> getMappings()
Entity
Every implementation should respect the parents mappings. The following sample shows different mapping types:
public Map<String, String> getMappings() { Map<String, String> mappings = super.getMappings(); mappings.put("title", "name"); mappings.put("streams", Stream.class.getName()); mappings.put("pageDefinitions", "pageType|" + ThemeElement.class.getName()); return mappings; }The mappings explained:
List
, known (named) children are hold in a Map
.
The mapped value is used as classname to create child instances.Map
, that holds grouped
children. Known children are hold by a Map
, unknown children by a
List
, so "pageDefinitions" may contain elements of type
Map
, or List
. pageType, a property of
ThemeElement
, is used to group the children. The word before the
'|' is the property name used as key value for grouping and the type
after '|' is used to create instances.
getMappings
in interface Entity
getMappings
in class AbstractEntity
Map
with property names as keys and column
names as values.public final String getPluginDir()
public Map<String,Integer> getSkipList()
ApplicationConfig
getSkipList
in interface Entity
getSkipList
in class ApplicationConfig
public Map<String,Boolean> getSupportedDBDrivers()
getSupportedDBDrivers
in interface DBConfig
getSupportedDBDrivers
in class AbstractConfigBase
public List<String> getUserAttributes()
Entity
getUserAttributes
in interface Entity
getUserAttributes
in class ApplicationConfig
public void getValuesFrom(DBConfig other)
public final boolean isSetupNeeded()
public void setDbType(String dbType)
DBConfig
setDbType
in interface DBConfig
dbType
- - the type of the data storagepublic final void setDriveMappings(Map<String,DriveMapping> m)
public final void setDrvClassName(String drvClassName)
DBConfig
setDrvClassName
in interface DBConfig
drvClassName
- - the classname of the driverpublic final void setDrvLibPath(File drvLibPath)
public void setDrvUrl(String url)
DBConfig
setDrvUrl
in interface DBConfig
url
- - url used to access the data storagepublic final void setDsDB(String dsDB)
DBConfig
setDsDB
in interface DBConfig
dsDB
- - name of the data storagepublic final void setDsHost(String dsHost)
DBConfig
setDsHost
in interface DBConfig
dsHost
- - hostname of data storage serverpublic final void setDsPassword(String dsPassword)
DBConfig
setDsPassword
in interface DBConfig
dsPassword
- - password for data storagepublic final void setDsSchema(String dsSchema)
DBConfig
setDsSchema
in interface DBConfig
dsSchema
- - the default schema namepublic final void setDsUser(String dsUser)
DBConfig
setDsUser
in interface DBConfig
dsUser
- - user for data storagepublic final void setMappings(Collection<DriveMapping> list)
public final void setPluginDir(String pluginDir)
public final void setSetupNeeded(boolean setupNeeded)
|
SRJRCFrames v0.1.296 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |