|
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.erowid.sperowider.hsqldb.BasicTable
Provides basic functionality to classes that want to present Java interfaces to HSQLDB tables.
Field Summary | |
static int |
CACHED
Used in constructors to indicate that data will be stored in a mix of memory and file. |
static int |
MEMORY
Used in constructors to indicate that all data should be stored in memory. |
Constructor Summary | |
BasicTable(String name,
Connection connection,
int mode)
Represents a database table with the given name. |
Method Summary | |
void |
execSQL(String sql)
Convenience method to execute some SQL. |
Connection |
getConnection()
The database connection to the database containing this table. |
int |
getMode()
Returns the mode value, which is either MEMORY or CACHED . |
String |
getName()
Returns the table name. |
String |
getTableCreatePrefix()
Uses getMode() to return either "create cached table" or "create memory table". |
PreparedStatement |
prepareStatement(String sql)
A convenience method to prepare a SQL statement. |
boolean |
tableExists()
Returns true if the backing table actually exists. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int MEMORY
public static final int CACHED
Constructor Detail |
public BasicTable(String name, Connection connection, int mode)
MEMORY
or CACHED
.
Method Detail |
public int getMode()
MEMORY
or CACHED
.
public String getTableCreatePrefix()
getMode()
to return either "create cached table" or "create memory table".
public Connection getConnection()
public String getName()
public PreparedStatement prepareStatement(String sql) throws SQLException
SQLException
public boolean tableExists() throws SQLException
SQLException
public void execSQL(String sql) throws SQLException
SQLException
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |