|
Copyright © 2005 Scientific Applications. All Rights Reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sciapp.table.db.DefaultDatabaseTableDefinition
public class DefaultDatabaseTableDefinition
DefaultDatabaseTableDefinition allows an easy definition to be created.
| Field Summary | |
|---|---|
protected Class[] |
classes
the Java classes of the columns |
protected String[] |
columns
the table columns |
protected String[] |
dbColumns
the database columns |
| Constructor Summary | |
|---|---|
DefaultDatabaseTableDefinition()
Constructs a DefaultDatabaseTableDefinition with no columns defined. |
|
DefaultDatabaseTableDefinition(String[] columns)
Constructs a DefaultDatabaseTableDefinition. |
|
DefaultDatabaseTableDefinition(String[] columns,
Class[] classes)
Constructs a DefaultDatabaseTableDefinition. |
|
DefaultDatabaseTableDefinition(String[] columns,
Class[] classes,
String[] dbColumns)
Constructs a DefaultDatabaseTableDefinition. |
|
| Method Summary | |
|---|---|
void |
addColumn(String column,
Class columnClass,
String dbColumn)
Adds the column to the definition. |
protected void |
clear()
Clears the definition of any columns. |
Class |
getColumnClass(int index)
Returns the class of all the cells in the column. |
int |
getColumnCount()
Returns the number of columns. |
String |
getColumnName(int index)
Returns the name of the column at columnIndex as it will be displayed by the table |
String |
getDatabaseColumn(int index)
Returns the name of the column at columnIndex as it exists in the database. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected String[] columns
protected Class[] classes
protected String[] dbColumns
| Constructor Detail |
|---|
public DefaultDatabaseTableDefinition()
public DefaultDatabaseTableDefinition(String[] columns)
public DefaultDatabaseTableDefinition(String[] columns,
Class[] classes)
public DefaultDatabaseTableDefinition(String[] columns,
Class[] classes,
String[] dbColumns)
| Method Detail |
|---|
public void addColumn(String column,
Class columnClass,
String dbColumn)
column - the name of the column as it appears on the tablecolumnClass - the java class of the columndbColumn - the name of the column as it appears on the databaseprotected void clear()
public Class getColumnClass(int index)
getColumnClass in interface TableDefinitionindex - the index of the column
public int getColumnCount()
getColumnCount in interface TableDefinitionpublic String getColumnName(int index)
getColumnName in interface TableDefinitionindex - the index of the column
public String getDatabaseColumn(int index)
getDatabaseColumn in interface DatabaseTableDefinitionindex - the index of the column
|
Copyright © 2005 Scientific Applications. All Rights Reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||