|
||||||||||
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(IDMethod type,
IdGenerator idGen)
Adds an IdGenerator to the database. |
boolean |
createAndRegisterIdBroker()
Creates the IDBroker for this Database and registers it with Torque. |
Adapter |
getAdapter()
Returns the adapter 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(IDMethod type)
Returns the IdGenerator of the given type for this Database. |
TableMap |
getIdTable()
Get the ID table for this database. |
String |
getName()
Rturns the name of the database. |
String |
getSchema()
Returns the database schema for this Database. |
void |
setAdapter(Adapter anAdapter)
Sets the adapter for this database. |
void |
setDataSourceFactory(DataSourceFactory aDataSourceFactory)
Sets the DataSourceFactory for this database. |
void |
setIdTable(String tableName)
Set the ID table for this database. |
void |
setIdTable(TableMap idTable)
Set the ID table for this database. |
void |
setSchema(String schema)
Sets the schema for this database. |
boolean |
startIdBroker()
Deprecated. This method will be removed in a future version of Torque. Please use createAndRegisterIdBroker() instead. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public String getName()
public Adapter getAdapter()
public void setAdapter(Adapter 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 TableMap getIdTable()
public void setIdTable(TableMap idTable)
idTable
- The TableMap representation for the ID table.public void setIdTable(String tableName)
tableName
- The name for the ID table.public IDBroker getIdBroker()
@Deprecated public boolean startIdBroker()
public boolean createAndRegisterIdBroker()
public IdGenerator getIdGenerator(IDMethod type)
type
- The type (i.e.name) of the IdGenerator.
public void addIdGenerator(IDMethod type, IdGenerator idGen)
type
- The type of the IdGenerator.idGen
- 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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |