|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.torque.engine.database.model.AppData
A class for holding application data structures.
Field Summary | |
private java.lang.String |
basePropsFilePath
The base of the path to the properties file, including trailing slash. |
private java.lang.String |
databaseType
The type for our databases. |
private java.util.List |
dbList
The list of databases for this application. |
private java.util.Map |
idiosyncrasyTable
The table of idiosyncrasies for various database types. |
(package private) boolean |
isInitialized
|
private java.lang.String |
name
Name of the database. |
Constructor Summary | |
AppData(java.lang.String databaseType,
java.lang.String basePropsFilePath)
Creates a new instance for the specified database type. |
Method Summary | |
Database |
addDatabase(org.xml.sax.Attributes attrib)
An utility method to add a new database from an xml attribute. |
void |
addDatabase(Database db)
Add a database to the list and sets the AppData property to this AppData |
private void |
doFinalInitialization()
|
Database |
getDatabase()
Get database object. |
Database |
getDatabase(java.lang.String name)
Return the database with the specified name. |
Database[] |
getDatabases()
Return an array of all databases |
protected java.util.Properties |
getIdiosyncrasies(java.lang.String databaseType)
Each database has its own list of idiosyncrasies which can be configured by editting its db.props file. |
java.lang.String |
getName()
Get the name of the database. |
java.lang.String |
getShortName()
Get the short name of the database (without the '-schema' postfix). |
boolean |
hasMultipleDatabases()
Returns whether this application has multiple databases. |
void |
setName(java.lang.String name)
Set the name of the database. |
java.lang.String |
toString()
Creats a string representation of this AppData. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private java.util.List dbList
private java.util.Map idiosyncrasyTable
private java.lang.String databaseType
private java.lang.String basePropsFilePath
private java.lang.String name
boolean isInitialized
Constructor Detail |
public AppData(java.lang.String databaseType, java.lang.String basePropsFilePath)
databaseType
- The default type for any databases added to
this application model.basePropsFilePath
- The base of the path to the properties
file, including trailing slash.Method Detail |
protected java.util.Properties getIdiosyncrasies(java.lang.String databaseType) throws EngineException
db.props
file.
databaseType
- The type of database to retrieve the
properties of.
databaseType
.
EngineException
- Couldn't locate properties file.public void setName(java.lang.String name)
name
- of the database.public java.lang.String getName()
public java.lang.String getShortName()
public Database getDatabase()
public Database[] getDatabases()
public boolean hasMultipleDatabases()
public Database getDatabase(java.lang.String name)
name
- database name
public Database addDatabase(org.xml.sax.Attributes attrib)
attrib
- the xml attributes
public void addDatabase(Database db)
db
- the database to addprivate void doFinalInitialization()
public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |