|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cmu.survey.data.TableStorageStub<DataTableModelMySQL> cmu.survey.data.mysql.TableStorageMySQL
public class TableStorageMySQL
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface cmu.survey.data.TableStorage |
---|
TableStorage.SearchingForConnectionListener, TableStorage.TableListListener |
Field Summary |
---|
Fields inherited from class cmu.survey.data.TableStorageStub |
---|
lastErrorMessage, searchingForConnectionListeners, tableListListeners, tableVersionStorage |
Constructor Summary | |
---|---|
TableStorageMySQL(DatabaseConnection databaseConnection)
|
|
TableStorageMySQL(java.lang.String databaseConnectionString)
|
|
TableStorageMySQL(java.lang.String databaseConnectionString,
TableStorage.SearchingForConnectionListener connectionListener)
|
Method Summary | |
---|---|
void |
cancelSearchingForConnection()
Stop waiting for the TableStorage to be connected -- and start throwing exceptions. |
void |
close()
Closes all the DataTableModels that have been opened. |
DatabaseConnection |
databaseConnectionFailedPleaseRefresh()
|
protected boolean |
deleteTableProtected(java.lang.String tableName)
|
void |
doneWithDatabaseQuery(DatabaseQuery query)
Call this when you are done with a DatabaseQuery that you created with getNewDatabaseQuery(). |
DatabaseConnection |
getDatabaseConnection()
|
java.lang.Integer |
getLastInsertID(DatabaseQuery db)
|
DatabaseQuery |
getNewDatabaseQuery()
Get a database query. |
protected DataTableModelSingularInfo<DataTableModelMySQL> |
getSingularInfo(java.lang.String tableName)
|
protected DataTableModelSingularInfo<DataTableModelMySQL> |
getSingularInfo(TableFormat tableFormat)
|
java.util.Vector<java.lang.String> |
getTableNames()
|
protected DataTableModelMySQL |
getTableProtected(DataTableModelSingularInfo singularInfo)
|
boolean |
isOpen()
|
boolean |
isTableNamesCaseSensitive()
Returns whether table names are case sensitive. |
boolean |
isValidLabelString(java.lang.String labelString)
Returns whether or not a string is a valid name for tables, columns, etc. |
protected DataTableModelMySQL |
newTable(java.lang.String tableName,
java.util.List<java.lang.String> columnNames,
java.util.List<java.lang.Class> columnTypes,
java.util.List<java.lang.Boolean> columnAllowsNull,
java.util.List<java.lang.Object> columnDefaultValues,
java.lang.Integer primaryKeyColumn,
DataTableModelSingularInfo<DataTableModelMySQL> tableInfo)
Returns a new table, or null if it fails. |
protected boolean |
renameTableProtected(java.lang.String oldTableName,
java.lang.String newTableName)
|
boolean |
tableExists(java.lang.String tableName)
|
Methods inherited from class cmu.survey.data.TableStorageStub |
---|
addSearchingForConnectionListener, addTableListListener, deleteTable, finalize, fireTableListChanged, getLastErrorMessage, getTable, getTable, getTableVersionStorage, newTable, newTable, newTable, newTable, newTable, newTable, newTable, removeSearchingForConnectionListener, removeTableListListener, renameTable |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TableStorageMySQL(java.lang.String databaseConnectionString) throws java.lang.Throwable
java.lang.Throwable
public TableStorageMySQL(DatabaseConnection databaseConnection)
public TableStorageMySQL(java.lang.String databaseConnectionString, TableStorage.SearchingForConnectionListener connectionListener) throws java.lang.Throwable
java.lang.Throwable
Method Detail |
---|
public boolean tableExists(java.lang.String tableName)
protected DataTableModelMySQL newTable(java.lang.String tableName, java.util.List<java.lang.String> columnNames, java.util.List<java.lang.Class> columnTypes, java.util.List<java.lang.Boolean> columnAllowsNull, java.util.List<java.lang.Object> columnDefaultValues, java.lang.Integer primaryKeyColumn, DataTableModelSingularInfo<DataTableModelMySQL> tableInfo)
newTable
in class TableStorageStub<DataTableModelMySQL>
tableName
- columnNames
- A Vector of String of the names of each columncolumnTypes
- A Vector of Class with the types of each column -- must be the
same size() as columnNames.primaryKeyColumn
- An index into columnNames with the primary key column. If
there is no primary key, it should be -1. If the primary key
column is an Integer, it will also be made as an
auto_increment column.
public java.util.Vector<java.lang.String> getTableNames()
public boolean isTableNamesCaseSensitive()
protected DataTableModelSingularInfo<DataTableModelMySQL> getSingularInfo(java.lang.String tableName)
getSingularInfo
in class TableStorageStub<DataTableModelMySQL>
protected DataTableModelSingularInfo<DataTableModelMySQL> getSingularInfo(TableFormat tableFormat)
getSingularInfo
in class TableStorageStub<DataTableModelMySQL>
protected DataTableModelMySQL getTableProtected(DataTableModelSingularInfo singularInfo)
getTableProtected
in class TableStorageStub<DataTableModelMySQL>
protected boolean deleteTableProtected(java.lang.String tableName)
deleteTableProtected
in class TableStorageStub<DataTableModelMySQL>
protected boolean renameTableProtected(java.lang.String oldTableName, java.lang.String newTableName)
renameTableProtected
in class TableStorageStub<DataTableModelMySQL>
public DatabaseQuery getNewDatabaseQuery()
public void doneWithDatabaseQuery(DatabaseQuery query)
query
- public boolean isOpen()
public DatabaseConnection getDatabaseConnection()
public boolean isValidLabelString(java.lang.String labelString)
TableStorage
public void cancelSearchingForConnection()
TableStorage
public DatabaseConnection databaseConnectionFailedPleaseRefresh()
public java.lang.Integer getLastInsertID(DatabaseQuery db)
public void close()
TableStorageStub
close
in interface TableStorage
close
in class TableStorageStub<DataTableModelMySQL>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |