|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--planetj.database.DBSystem
Represents a relational database which can be referenced by a URL. A DBSystem object is created whenever the DatabaseManager opens a connection to a database. One DBSystem object exists for each alias used to create a connection pool
Field Summary | |
static byte |
LIBRARIES_NOT_SUPPORTED
This DB System does not support libraries |
static byte |
LIBRARIES_REQUIRED
This DB System requries libraries in SQL statements |
static byte |
LIBRARIES_SUPPORTED
This DB System supports libraries |
Method Summary | |
Object |
correctDatabaseObject(Object object,
int datatype)
Returns an object of the appropriate type for insertion into the database. |
Library |
createLibrary(String pLibraryName)
Gets the Library with the given name. |
static DBSystem |
createSystem(String systemURL)
Deprecated. removed (11/29/2002 1:48:58 PM) - driver is no required to create the DBSystem |
static DBSystem |
createSystem(String url,
String alias)
Creates and returns a new DBSystem using the given system url and alias |
static DBSystem |
createSystem(String url,
String alias,
Class dbSystem)
Creates and returns a new DBSystem using the given system url and alias |
static DBSystem |
createSystem(String url,
String alias,
String driver)
Creates and returns a new DBSystem using the given system url and alias |
String |
getAlias()
Returns the alias of the system. |
Map |
getAllLibraries()
Returns a Map of all the Libraries (keyed by name) in this system. |
DataEngineCache |
getCache(AbstractContext context)
Gets the cache which holds RC's read from this system |
String |
getColumnIndicationCharacter()
Returns the character that needs to be used during an insert. |
String |
getDefaultDateFormat()
|
String |
getDefaultLibraryName()
Gets the name of the default library specified in the connection URL. |
static Class |
getFieldClassForSQLTypeName(String pTypeName)
Gets the Field subclass that is representative of this SQL type name. |
byte[] |
getIPAddress()
Gets the IP Address of this system |
Map |
getLibraries()
Gets a Map of the libraries in this system. |
Library |
getLibrary(String pLibraryName)
Gets one of this system's libraries |
Library |
getLibrary(String pLibraryName,
boolean pCreate)
Get the DBSystem's Library with the given name. |
byte |
getLibrarySupportLevel()
Gets the level of library support; this is one of the constants defined in the class. |
String |
getMetaDataAlias()
Gets the alias of the system containing additional meta data (FD's, PV's, etc) for this system. |
static DBSystem |
getMetaDataSystem()
Gets the metadata system |
String |
getName()
|
String |
getProperties()
Gets the connection JDBC properties of the system. |
static List |
getSQLTypeNames()
Gets a List of SQL type names. |
int |
getSupportedDataType(int datatype)
Returns the equivalent supported datatype name for a specified datatype. |
static DBSystem |
getSystem(String systemAlias)
Gets the DBSystem for the given system alias. |
String |
getURL()
Returns the url of the system. |
StringBuffer |
getXMLData(StringBuffer pXMLData)
This returns a StringBuffer containing all necessary XML data for this object. |
boolean |
isBackgroundThreadsSupported()
Override this method to return false if this system does not support background threads |
boolean |
isDefaultLibraryOmitted()
Tests if the default library should be included in SQL statements sent to the DB (if the statement operates on the default library). |
boolean |
isDelegateToPersonal()
Tests if this DBSystem is a placeholder for multiple personal DBSystems which should be used to connect to the DB in lieu of using this one. |
boolean |
isHasAllLibraries()
Returns whether or not this DBSystem has all the libraries in the database. |
Library |
removeLibrary(String pLibraryName)
Removes the Library with the given name. |
void |
setDelegateToPersonal(boolean newDelegateToPersonal)
Sets if this DBSystem is a placeholder for multiple personal DBSystems which should be used to connect to the DB in lieu of using this one. |
void |
setProperties(String pProperties)
Sets the connection JDBC properties of the system. |
void |
startRetrieveAllLibrariesTask()
Starts a task to retrieve all the Libraries in the database for this system. |
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. |
String |
toString()
Returns the String representation of this system. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final byte LIBRARIES_NOT_SUPPORTED
public static final byte LIBRARIES_SUPPORTED
public static final byte LIBRARIES_REQUIRED
Method Detail |
public Object correctDatabaseObject(Object object, int datatype)
object
- The object to be inserted into the databasedatatype
- The datatype of the database field
public Library createLibrary(String pLibraryName)
pLibraryName
- name of Library
public static DBSystem createSystem(String systemURL) throws DataEngineException
systemURL
- String
DataEngineException
public static DBSystem createSystem(String url, String alias) throws DataEngineException
DataEngineException
public static DBSystem createSystem(String url, String alias, Class dbSystem) throws DataEngineException
url
- String
DataEngineException
public static DBSystem createSystem(String url, String alias, String driver) throws DataEngineException
DataEngineException
public String getAlias()
public Map getAllLibraries() throws DataEngineException
DataEngineException
public DataEngineCache getCache(AbstractContext context)
public String getColumnIndicationCharacter()
This char will is necessary when a column name is the same as a reserved keyword for this DBSystem. Such as KEY or USER Creation date: (6/23/2003 2:27:41 PM)
public String getDefaultDateFormat()
public String getDefaultLibraryName()
public static Class getFieldClassForSQLTypeName(String pTypeName) throws DataEngineException
pTypeName
- The SQL type name of the field
DataEngineException
public byte[] getIPAddress()
public Map getLibraries()
public Library getLibrary(String pLibraryName)
pLibraryName
- The name of the library to get
public Library getLibrary(String pLibraryName, boolean pCreate)
pLibraryName
- The name of the library to getpCreate
- Whether or not the library should be created if it doesn't exist
public byte getLibrarySupportLevel()
public String getMetaDataAlias()
public static DBSystem getMetaDataSystem()
public String getName()
getName
in interface IDBObject
public String getProperties()
public static List getSQLTypeNames()
public int getSupportedDataType(int datatype)
If the supplied datatype is supported, then that same datatype is returned.
public static DBSystem getSystem(String systemAlias)
public String getURL()
public StringBuffer getXMLData(StringBuffer pXMLData)
getXMLData
in interface IXMLObject
public boolean isBackgroundThreadsSupported()
public boolean isDefaultLibraryOmitted()
public boolean isDelegateToPersonal()
public boolean isHasAllLibraries()
public Library removeLibrary(String pLibraryName)
pLibraryName
- name of Library
public void setDelegateToPersonal(boolean newDelegateToPersonal)
public void setProperties(String pProperties)
public void startRetrieveAllLibrariesTask()
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 String toString()
toString
in class Object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |