|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.torque.Database
public class Database
Bundles all information about a database. This includes the database adapter, the database Map and the Data Source Factory.
Method Summary | |
---|---|
void |
addIdGenerator(String type,
IdGenerator idGen)
Adds an IdGenerator to the database. |
DB |
getAdapter()
Returns the adapther to this database. |
DatabaseMap |
getDatabaseMap()
Returns the database map for this database. |
DataSourceFactory |
getDataSourceFactory()
Returns the DataSourceFactory for this database. |
IDBroker |
getIDBroker()
Get the IDBroker for this database. |
IdGenerator |
getIdGenerator(String type)
Returns the IdGenerator of the given type for this Database. |
String |
getName()
returns the name of the database. |
String |
getSchema()
Returns the database schema for this Database. |
void |
setAdapter(DB anAdapter)
Sets the adapter for this database. |
void |
setDataSourceFactory(DataSourceFactory aDataSourceFactory)
Sets the DataSourceFactory for this database. |
void |
setSchema(String schema)
Sets the schema for this database. |
boolean |
startIDBroker()
Creates the IDBroker for this DatabaseMap and starts it for the given database. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public String getName()
public DB getAdapter()
public void setAdapter(DB anAdapter)
anAdapter
- The adapter for this database, or null to remove the
current adapter from this database.public DatabaseMap getDatabaseMap()
public DataSourceFactory getDataSourceFactory()
public void setDataSourceFactory(DataSourceFactory aDataSourceFactory)
aDataSourceFactory
- The new DataSorceFactory for this database,
or null to remove the current DataSourceFactory.public IDBroker getIDBroker()
public boolean startIDBroker()
public IdGenerator getIdGenerator(String type)
type
- The type (i.e.name) of the IdGenerator
public void addIdGenerator(String type, IdGenerator idGen)
type
- The type of the IdGeneratoridGen
- The new IdGenerator for the type, or null
to remove the IdGenerator of the given type.public String getSchema()
public void setSchema(String schema)
schema
- the name of the database schema to set, or null to remove
the current schema.
NullPointerException
- if no DatasourceFactory exists for this
database.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |