|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectgeneralDatabase.EmptyTableDefinition
public class EmptyTableDefinition
A totally empty table definition. Not really empty, since it includes an Id.
| Field Summary | |
|---|---|
protected java.sql.Connection |
checkedConnection
|
private PamTableItem |
indexItem
|
protected java.util.ArrayList<PamTableItem> |
pamTableItems
|
protected java.lang.String |
tableName
|
| Constructor Summary | |
|---|---|
EmptyTableDefinition(java.lang.String tableName)
|
|
| Method Summary | |
|---|---|
int |
addTableItem(PamTableItem pamTableItem)
Adds a new table item |
static java.lang.String |
deblankString(java.lang.String str)
Function to remove leading and trailing blanks and to replace spaces in a database table or column name with the _ character. |
(package private) static PamTableDefinition |
findTableDefinition(java.lang.String tableName)
Searches the Pamguard system for a table with a particular name. |
PamTableItem |
findTableItem(PamTableItem tableItem)
Searches the table definition to see if a TableItem already exists with the same name as tableITem. |
PamTableItem |
findTableItem(java.lang.String itemName)
Searches the existing table defnition to see if a table item already exists with a given name. |
PamTableItem |
getIndexItem()
|
java.lang.String |
getSQLInsertString()
gets an sql insert string for the table that selects all fields. |
java.lang.String |
getSQLSelectString()
Get a very basic select string which queries for all items in the table, no ordering or selection |
PamTableItem |
getTableItem(int itemNumber)
|
int |
getTableItemCount()
|
java.lang.String |
getTableName()
|
private static boolean |
isValidCharacter(char ch)
|
PamTableItem |
removeTableItem(int itemIndex)
Removes a table item from the table definition. |
boolean |
removeTableItem(PamTableItem item)
Removes a table item from the table definition. |
void |
setTableName(java.lang.String tableName)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String tableName
protected java.util.ArrayList<PamTableItem> pamTableItems
protected java.sql.Connection checkedConnection
private PamTableItem indexItem
| Constructor Detail |
|---|
public EmptyTableDefinition(java.lang.String tableName)
tableName - | Method Detail |
|---|
public static java.lang.String deblankString(java.lang.String str)
str - datbase table or column name
private static boolean isValidCharacter(char ch)
public java.lang.String getTableName()
public void setTableName(java.lang.String tableName)
public PamTableItem getTableItem(int itemNumber)
itemNumber - Table item index (0 indexed)
PamTableItempublic int getTableItemCount()
PamTableItempublic int addTableItem(PamTableItem pamTableItem)
pamTableItem - new table item object.
If an item already exists with the same name (after deblanking) the new table item will not be added to the list and the index of the existing table item will be returned.
public PamTableItem removeTableItem(int itemIndex)
itemIndex - index of the table item.
public boolean removeTableItem(PamTableItem item)
item - reference to the item to be removed.
public PamTableItem findTableItem(java.lang.String itemName)
itemName -
public PamTableItem findTableItem(PamTableItem tableItem)
tableItem -
public java.lang.String getSQLInsertString()
If skipCounters is true, then counters are not included in the statement. Generally, this is the sensible ting to do.
public java.lang.String getSQLSelectString()
static PamTableDefinition findTableDefinition(java.lang.String tableName)
tableName -
public PamTableItem getIndexItem()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||