|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectplanetj.database.Library
Represents a group of tables in a relational database. A library is called a catalog on some system, or a schema on others.
Field Summary | |
static java.lang.String |
className
|
static java.lang.String |
KEY_SEPARATOR
|
Constructor Summary | |
protected |
Library(java.lang.String pName,
DBSystem pSystem)
Library constructor comment. |
Method Summary | |
static Library |
createLibrary(java.lang.String pSystemAlias,
java.lang.String pLibraryName)
Creates and returns a new Library using the given system url, library name, (a Library is only created if it doesn't already exist). |
Table |
createTable(java.lang.String pTableName)
Returns the Table in this Library with the given name. |
Table |
createTable(java.lang.String pTableName,
java.lang.Class pTableClass)
Returns the Table in this Library with the given name. |
java.util.Map |
getAllTables()
Returns a Map of all the Tables in this Library. |
java.lang.String |
getDBLibraryName()
Returns the name of this library in the database. |
static Library |
getDefaultLibrary(java.lang.String pSystemAlias)
Returns the default Library for the given library name and system alias. |
static java.util.Map |
getLibraries(java.lang.String pSystemAlias)
Returns a Map of Libraries for the specified system alias. |
static Library |
getLibrary(java.lang.String pSystemAlias,
java.lang.String pLibraryName)
Gets the Library with the given name for the DBSystem with the specified alias. |
static Library |
getLibrary(java.lang.String pSystemAlias,
java.lang.String pLibraryName,
boolean pCreate)
Returns the Library for the given library name and system alias. |
java.lang.String |
getMetaDataSystemAlias()
Gets the alias of the system this Library's DBSystem uses for retrieving its meta data. |
java.lang.String |
getName()
Returns the name of this library. |
DBSystem |
getSystem()
Returns the DBSystem to which this Library belongs. |
java.lang.String |
getSystemAlias()
Returns the url of this Library's DBSystem. |
java.lang.String |
getSystemURL()
Returns the url of this Library's DBSystem. |
Table |
getTable(java.lang.String pTableName)
Returns the Table in this Library with the given name. |
Table |
getTable(java.lang.String pTableName,
boolean pCreate)
Returns the Table in this Library with the given name. |
java.util.List |
getTableNames()
Gets a list of table names currently in the library instance. |
java.util.Map |
getTables()
Returns a Map of Table objects existing in this Library (May not be all of the tables in the database). |
protected java.util.Map |
getTablesInternal()
Returns a Map of Table objects existing in this Library (May not be all of the tables in the database). |
java.lang.StringBuffer |
getXMLData(java.lang.StringBuffer pXMLData)
This returns a StringBuffer containing all necessary XML data for this object. |
static boolean |
isCompatible(java.lang.String lib1,
java.lang.String lib2)
Tests if the two library names are compatible (i.e. |
boolean |
isDefault()
Tests if this library is the default library |
boolean |
isExistenceConfirmed()
Return whether or not this Table's existence in the database has been confirmed. |
boolean |
isHasAllTables()
|
boolean |
isShared()
Tests if this Library is the logical "shared" library |
Table |
removeTable(java.lang.String pTableName)
Removes the Table with the given name. |
protected void |
setName(java.lang.String pName)
Sets the name of this library. |
void |
startRetrieveAllTablesTask()
|
void |
taskCompleted(TaskEvent pTaskEvent)
Invoked when a task completes its execution. |
void |
taskFailed(TaskEvent pTaskEvent)
Invoked when a task fails while executing. |
void |
taskStarted(TaskEvent pTaskEvent)
Invoked when a task starts executing. |
java.lang.String |
toString()
Returns the String representation of this Library. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String KEY_SEPARATOR
public static final java.lang.String className
Constructor Detail |
protected Library(java.lang.String pName, DBSystem pSystem)
Method Detail |
public static Library createLibrary(java.lang.String pSystemAlias, java.lang.String pLibraryName)
pSystemAlias
- pLibraryName
-
public static boolean isCompatible(java.lang.String lib1, java.lang.String lib2)
public Table createTable(java.lang.String pTableName)
pTableName
- String
public Table createTable(java.lang.String pTableName, java.lang.Class pTableClass)
public java.util.Map getAllTables() throws DataEngineException
DataEngineException
public java.lang.String getDBLibraryName()
public static Library getDefaultLibrary(java.lang.String pSystemAlias)
public static java.util.Map getLibraries(java.lang.String pSystemAlias)
public static Library getLibrary(java.lang.String pSystemAlias, java.lang.String pLibraryName)
public static Library getLibrary(java.lang.String pSystemAlias, java.lang.String pLibraryName, boolean pCreate)
public java.lang.String getMetaDataSystemAlias()
public java.lang.String getName()
getName
in interface IDBObject
public DBSystem getSystem()
public java.lang.String getSystemAlias()
public java.lang.String getSystemURL()
public Table getTable(java.lang.String pTableName)
public Table getTable(java.lang.String pTableName, boolean pCreate)
public java.util.List getTableNames()
public java.util.Map getTables()
protected java.util.Map getTablesInternal()
public java.lang.StringBuffer getXMLData(java.lang.StringBuffer pXMLData)
getXMLData
in interface IXMLObject
public boolean isDefault()
public boolean isExistenceConfirmed()
public boolean isHasAllTables()
public Table removeTable(java.lang.String pTableName)
pTableName
- name of Table to remove
protected void setName(java.lang.String pName)
public void startRetrieveAllTablesTask()
public void taskCompleted(TaskEvent pTaskEvent)
taskCompleted
in interface ITaskListener
public void taskFailed(TaskEvent pTaskEvent)
taskFailed
in interface ITaskListener
public void taskStarted(TaskEvent pTaskEvent)
taskStarted
in interface ITaskListener
public java.lang.String toString()
public boolean isShared()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |