|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.ucsb.nceas.metacat.DBConnection
A class represent a connection object, it includes connection itself, index, status, age, createtime, connection time, usageCount, warning message
Constructor Summary | |
DBConnection()
Default constructor of the DBConnection class |
Method Summary | |
void |
close()
Close a DBConnection object |
void |
commit()
Method to make a commit command |
java.sql.Statement |
createStatement()
Method to create a Statement |
long |
getAge()
get the db connetion age from the object |
java.lang.String |
getCheckOutMethodName()
get the the name of method checked out the connection from the object |
int |
getCheckOutSerialNumber()
get the check out serial number |
long |
getCheckOutTime()
get the when a db connetion was checked out |
java.sql.Connection |
getConnections()
get the connetion from the object |
long |
getConnectionTime()
get the how long db connetion used for the object |
long |
getCreateTime()
get the db connetion created time from the object |
java.sql.DatabaseMetaData |
getMetaData()
Method to get meta data |
int |
getStatus()
get the db connetion status from the object |
java.lang.String |
getTag()
get the db connetion tag from the object |
int |
getUsageCount()
get the db connetion usage times from the object |
java.sql.SQLWarning |
getWarningMessage()
get the db connetion waring message from the object |
void |
increaseCheckOutSerialNumber(int myCheckOutSerialNumber)
Increase a usage number to this object |
void |
increaseUsageCount(int myUsageCount)
Increase a usage number to this object |
static java.sql.Connection |
openConnection()
Method to establish DBConnection |
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql)
Method to create a PreparedStatement by sending a sql statement |
void |
rollback()
Method to roll back |
void |
setAge(long myAge)
Set a connection age to this object |
void |
setAutoCommit(boolean autoCommit)
Method to set commit mode |
void |
setCheckOutMethodName(java.lang.String myCheckOutMethodName)
Set a method name to the checkOutMethodName |
void |
setCheckOutSerialNumber(int myCheckOutSerialNumber)
Set check out serial number to this object |
void |
setCheckOutTime(long myCheckOutTime)
Set check out time to this object |
void |
setConnections(java.sql.Connection myConnection)
Set a connection to this object |
void |
setConnectionTime(long myConnectionTime)
Set a connection time to this object It is accumulated |
void |
setCreateTime(long myCreateTime)
Set a usage number to this object |
void |
setStatus(int myStatus)
Set a connection status to this object |
void |
setTag(java.lang.String myTag)
Set a connection status to this object |
void |
setUsageCount(int myUsageCount)
Set a usage number to this object |
void |
setWarningMessage(java.sql.SQLWarning myWarningMessage)
Set a warning message to this object |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DBConnection() throws java.sql.SQLException
Method Detail |
public java.sql.Connection getConnections()
public void setConnections(java.sql.Connection myConnection)
public java.lang.String getTag()
public void setTag(java.lang.String myTag)
public int getStatus()
public void setStatus(int myStatus)
public long getAge()
public void setAge(long myAge)
public long getCreateTime()
public void setCreateTime(long myCreateTime)
public long getConnectionTime()
public void setConnectionTime(long myConnectionTime)
public long getCheckOutTime()
public void setCheckOutTime(long myCheckOutTime)
public int getUsageCount()
public void setUsageCount(int myUsageCount)
public void increaseUsageCount(int myUsageCount)
public int getCheckOutSerialNumber()
public void setCheckOutSerialNumber(int myCheckOutSerialNumber)
public void increaseCheckOutSerialNumber(int myCheckOutSerialNumber)
public java.sql.SQLWarning getWarningMessage() throws java.sql.SQLException
java.sql.SQLException
public void setWarningMessage(java.sql.SQLWarning myWarningMessage)
public java.lang.String getCheckOutMethodName()
public void setCheckOutMethodName(java.lang.String myCheckOutMethodName)
public void close() throws java.sql.SQLException
java.sql.SQLException
public static java.sql.Connection openConnection() throws java.sql.SQLException
java.sql.SQLException
public java.sql.PreparedStatement prepareStatement(java.lang.String sql) throws java.sql.SQLException
java.sql.SQLException
public java.sql.Statement createStatement() throws java.sql.SQLException
java.sql.SQLException
public void commit() throws java.sql.SQLException
java.sql.SQLException
public void setAutoCommit(boolean autoCommit) throws java.sql.SQLException
java.sql.SQLException
public void rollback() throws java.sql.SQLException
java.sql.SQLException
public java.sql.DatabaseMetaData getMetaData() throws java.sql.SQLException
java.sql.SQLException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |