|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.infoviz.datamodel.table.IVTableDefinition
This class contains the metadata for a table like the column types and primary keys. This class is thread-safe
$Id$ $Revision$ $Author$
Constructor Summary | |
IVTableDefinition(IVColumnDefinition[] columnDef)
constructs a table with the specified coulumns |
|
IVTableDefinition(java.lang.String[] columnNames,
java.lang.Class[] columnTypes)
constructs a table with the specified column attributes. |
Method Summary | |
void |
addColumn(IVColumnDefinition columnDef)
add a new column to the table |
boolean |
containsColumn(java.lang.String columnName)
checks if a column with the given name exists |
IVColumnDefinition |
getColumnAtIndex(int index)
finds column at a given index |
int |
getColumnCount()
returns the no. |
IVColumnDefinition[] |
getColumnDefinitions()
get all the columns |
int |
getColumnIndex(java.lang.String name)
finds index of the column with the given name. |
IVColumnDefinition |
getColumnWithName(java.lang.String name)
finds a column with the given name |
void |
removeColumn(IVColumnDefinition columnDef)
remove a column from the definition |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public IVTableDefinition(java.lang.String[] columnNames, java.lang.Class[] columnTypes)
columnNames
- name of the columns, this name will also be used as column display name. 2 columns cannot have the same namecolumnTypes
- the data type for the column whose name is specified
in the corresponding array element in columnNamespublic IVTableDefinition(IVColumnDefinition[] columnDef)
columnDef
- columnsMethod Detail |
public int getColumnCount()
public int getColumnIndex(java.lang.String name)
name
- column name
public IVColumnDefinition getColumnWithName(java.lang.String name)
name
-
public IVColumnDefinition getColumnAtIndex(int index)
index
-
public IVColumnDefinition[] getColumnDefinitions()
public void addColumn(IVColumnDefinition columnDef)
columnDef
- the new column definition. Column names should be unique.public void removeColumn(IVColumnDefinition columnDef)
columnDef
- public boolean containsColumn(java.lang.String columnName)
columnName
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |