com.interfaceware.chameleon
Class Table

java.lang.Object
  extended by com.interfaceware.chameleon.Table
Direct Known Subclasses:
Message

public class Table
extends java.lang.Object

This class handles Table objects. This class gives the interface to the basic data container in the Chameleon framework: a nested in-memory table.


Field Summary
protected  long m_TableHandle
          The table handle member variable.
 
Constructor Summary
Table()
          Construct a Table object.
Table(long Handle)
          Construct a Table object with the specified table handle.
Table(long Handle, boolean IsOwner)
          Construct a Table object with the specified table handle.
 
Method Summary
 void addRow()
          Add a row to the table.
protected  void CHMtableAddRef(long TableHandle)
          Used in the internal implementation of Chameleon; should not be invoked directly.
protected  void CHMtableAddRow(long TableHandle)
          Used in the internal implementation of Chameleon; should not be invoked directly.
protected  int CHMtableColumnIndex(long TableHandle, java.lang.String ColumnName)
          Used in the internal implementation of Chameleon; should not be invoked directly.
protected  java.lang.String CHMtableColumnName(long TableHandle, int ColumnIndex)
          Used in the internal implementation of Chameleon; should not be invoked directly.
protected  int CHMtableColumnType(long TableHandle, int ColumnIndex)
          Used in the internal implementation of Chameleon; should not be invoked directly.
protected  int CHMtableCountOfColumn(long TableHandle)
          Used in the internal implementation of Chameleon; should not be invoked directly.
protected  int CHMtableCountOfRow(long TableHandle)
          Used in the internal implementation of Chameleon; should not be invoked directly.
protected  int CHMtableCountOfSubTable(long TableHandle)
          Used in the internal implementation of Chameleon; should not be invoked directly.
protected  long CHMtableCreate()
          Used in the internal implementation of Chameleon; should not be invoked directly.
protected  java.lang.String CHMtableDump(long TableHandle)
          Used in the internal implementation of Chameleon; should not be invoked directly.
protected  long CHMtableGetDateTime(long TableHandle, int ColumnIndex, int RowIndex)
          Used in the internal implementation of Chameleon; should not be invoked directly.
protected  double CHMtableGetDouble(long TableHandle, int ColumnIndex, int RowIndex)
          Used in the internal implementation of Chameleon; should not be invoked directly.
protected  int CHMtableGetInteger(long TableHandle, int ColumnIndex, int RowIndex)
          Used in the internal implementation of Chameleon; should not be invoked directly.
protected  java.lang.String CHMtableGetString(long TableHandle, int ColumnIndex, int RowInde)
          Used in the internal implementation of Chameleon; should not be invoked directly.
protected  boolean CHMtableIsNull(long TableHandle, int ColumnIndex, int RowIndex)
          Used in the internal implementation of Chameleon; should not be invoked directly.
protected  java.lang.String CHMtableName(long TableHandle)
          Used in the internal implementation of Chameleon; should not be invoked directly.
protected  void CHMtableRelease(long TableHandle)
          Used in the internal implementation of Chameleon; should not be invoked directly.
protected  void CHMtableSetDateTime(long TableHandle, int ColumnIndex, int RowIndex, long DateTimeHandleValue)
          Used in the internal implementation of Chameleon; should not be invoked directly.
protected  void CHMtableSetDouble(long TableHandle, int ColumnIndex, int RowIndex, double Value)
          Used in the internal implementation of Chameleon; should not be invoked directly.
protected  void CHMtableSetInteger(long TableHandle, int ColumnIndex, int RowIndex, int Value)
          Used in the internal implementation of Chameleon; should not be invoked directly.
protected  void CHMtableSetString(long TableHandle, int ColumnIndex, int RowIndex, java.lang.String Value)
          Used in the internal implementation of Chameleon; should not be invoked directly.
protected  int CHMtableState(long TableHandle, int ColumnIndex, int RowIndex)
          Used in the internal implementation of Chameleon; should not be invoked directly.
protected  long CHMtableSubTable(long TableHandle, int RowIndex, int TableIndex)
          Used in the internal implementation of Chameleon; should not be invoked directly.
 int columnIndex(java.lang.String ColumnName)
          Get the column index of the column named ColumnName.
 java.lang.String columnName(int ColumnIndex)
          Get the table column name.
 int columnType(int ColumnIndex)
          Get the column type of the column at the specified column index.
 int countOfColumn()
          Get the number of table columns.
 int countOfRow()
          Get the number of table rows.
 int countOfSubTable()
          Get the number of sub-tables.
protected  void finalize()
          Finalizer that invokes the release method.
 ChameleonDateTime getDate(int ColumnIndex, int RowIndex)
          Get the date/time value at ColumnIndex and RowIndex.
 double getdouble(int ColumnIndex, int RowIndex)
          Get the double value at ColumnIndex and RowIndex.
 java.lang.Double getDouble(int ColumnIndex, int RowIndex)
          Get the Double value at ColumnIndex and RowIndex.
 java.lang.Integer getInteger(int ColumnIndex, int RowIndex)
          Get the Integer value at ColumnIndex and RowIndex.
 int getState(int ColumnIndex, int RowIndex)
          Test the value in the cell at row RowIndex and column ColumnIndex to see if it is null, zero, empty or invalid.
 java.lang.String getString(int ColumnIndex, int RowIndex)
          Get the String value at ColumnIndex and RowIndex.
 long handle()
          Get the table handle.
 boolean isNull(int ColumnIndex, int RowIndex)
          Check if the value at ColumnIndex and RowIndex is null.
 void release()
          Free the Table object handle.
 void setDate(int ColumnIndex, int RowIndex, ChameleonDateTime Value)
          Set the value at ColumnIndex and RowIndex of a date/time-type column.
 void setdouble(int ColumnIndex, int RowIndex, double Value)
          Set the value at ColumnIndex and RowIndex of a double-type column.
 void setDouble(int ColumnIndex, int RowIndex, java.lang.Double Value)
          Set the value at ColumnIndex and RowIndex of a Double-type column.
 void setInteger(int ColumnIndex, int RowIndex, int Value)
          Set the value at ColumnIndex and RowIndex of an integer-type column.
 void setInteger(int ColumnIndex, int RowIndex, java.lang.Integer Value)
          Set the value at ColumnIndex and RowIndex of an Integer-type column.
 void setString(int ColumnIndex, int RowIndex, java.lang.String Value)
          Set the value at ColumnIndex and RowIndex of a String-type column.
 Table subTable(int RowIndex, int TableIndex)
          Get the sub-table with the specified row and table index.
 java.lang.String tableName()
          Get the table name.
 java.lang.String toString()
          Convert the table data to a string.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_TableHandle

protected long m_TableHandle
The table handle member variable. This is used in the internal implementation of Chameleon and should not be used directly.

Constructor Detail

Table

public Table()
      throws ChameleonException
Construct a Table object.

Throws:
ChameleonException

Table

public Table(long Handle)
      throws ChameleonException
Construct a Table object with the specified table handle. This is used in the internal implementation of Chameleon and should not be invoked directly.

Throws:
ChameleonException

Table

public Table(long Handle,
             boolean IsOwner)
      throws ChameleonException
Construct a Table object with the specified table handle. This is used in the internal implementation of Chameleon and should not be invoked directly.

Throws:
ChameleonException
Method Detail

release

public void release()
             throws ChameleonException
Free the Table object handle.

Throws:
ChameleonException

finalize

protected void finalize()
                 throws ChameleonException
Finalizer that invokes the release method.

Overrides:
finalize in class java.lang.Object
Throws:
ChameleonException

tableName

public java.lang.String tableName()
                           throws ChameleonException
Get the table name.

Throws:
ChameleonException

countOfColumn

public int countOfColumn()
                  throws ChameleonException
Get the number of table columns. Usage of this method with columnName offers an easy way to iterate through the columns in the table.

Throws:
ChameleonException

countOfRow

public int countOfRow()
               throws ChameleonException
Get the number of table rows.

Throws:
ChameleonException

countOfSubTable

public int countOfSubTable()
                    throws ChameleonException
Get the number of sub-tables.

Throws:
ChameleonException

subTable

public Table subTable(int RowIndex,
                      int TableIndex)
               throws ChameleonException
Get the sub-table with the specified row and table index.

Throws:
ChameleonException

columnName

public java.lang.String columnName(int ColumnIndex)
                            throws ChameleonException
Get the table column name. Usage of this method with countOfColumn offers an easy way to iterate through the columns in a table.

Throws:
ChameleonException

columnIndex

public int columnIndex(java.lang.String ColumnName)
                throws ChameleonException
Get the column index of the column named ColumnName. Returns -1 if there is no column with that name.

Throws:
ChameleonException

columnType

public int columnType(int ColumnIndex)
               throws ChameleonException
Get the column type of the column at the specified column index.

Throws:
ChameleonException
See Also:
DataType, http://www.interfaceware.com/manual/table_properties.html

addRow

public void addRow()
            throws ChameleonException
Add a row to the table.

Throws:
ChameleonException

setString

public void setString(int ColumnIndex,
                      int RowIndex,
                      java.lang.String Value)
               throws ChameleonException
Set the value at ColumnIndex and RowIndex of a String-type column. Throws an exception if the data type doesn't match.

Throws:
ChameleonException
See Also:
http://www.interfaceware.com/manual/table_properties.html

setDouble

public void setDouble(int ColumnIndex,
                      int RowIndex,
                      java.lang.Double Value)
               throws ChameleonException
Set the value at ColumnIndex and RowIndex of a Double-type column. Throws an exception if the data type doesn't match.

Throws:
ChameleonException
See Also:
http://www.interfaceware.com/manual/table_properties.html

setdouble

public void setdouble(int ColumnIndex,
                      int RowIndex,
                      double Value)
               throws ChameleonException
Set the value at ColumnIndex and RowIndex of a double-type column. Throws an exception if the data type doesn't match.

Throws:
ChameleonException
See Also:
http://www.interfaceware.com/manual/table_properties.html

setInteger

public void setInteger(int ColumnIndex,
                       int RowIndex,
                       int Value)
                throws ChameleonException
Set the value at ColumnIndex and RowIndex of an integer-type column. Throws an exception if the data type doesn't match.

Throws:
ChameleonException
See Also:
http://www.interfaceware.com/manual/table_properties.html

setInteger

public void setInteger(int ColumnIndex,
                       int RowIndex,
                       java.lang.Integer Value)
                throws ChameleonException
Set the value at ColumnIndex and RowIndex of an Integer-type column. Throws an exception if the data type doesn't match.

Throws:
ChameleonException
See Also:
http://www.interfaceware.com/manual/table_properties.html

setDate

public void setDate(int ColumnIndex,
                    int RowIndex,
                    ChameleonDateTime Value)
             throws ChameleonException
Set the value at ColumnIndex and RowIndex of a date/time-type column. Throws an exception if the data type doesn't match.

Throws:
ChameleonException
See Also:
http://www.interfaceware.com/manual/table_properties.html

getDate

public ChameleonDateTime getDate(int ColumnIndex,
                                 int RowIndex)
                          throws ChameleonException
Get the date/time value at ColumnIndex and RowIndex. Throws an exception if the data type doesn't match.

Throws:
ChameleonException
See Also:
http://www.interfaceware.com/manual/table_properties.html

getInteger

public java.lang.Integer getInteger(int ColumnIndex,
                                    int RowIndex)
                             throws ChameleonException
Get the Integer value at ColumnIndex and RowIndex. Throws an exception if the data type doesn't match.

Throws:
ChameleonException
See Also:
http://www.interfaceware.com/manual/table_properties.html

getString

public java.lang.String getString(int ColumnIndex,
                                  int RowIndex)
                           throws ChameleonException
Get the String value at ColumnIndex and RowIndex. Throws an exception if the data type doesn't match.

Throws:
ChameleonException
See Also:
http://www.interfaceware.com/manual/table_properties.html

getDouble

public java.lang.Double getDouble(int ColumnIndex,
                                  int RowIndex)
                           throws ChameleonException
Get the Double value at ColumnIndex and RowIndex. Throws an exception if the data type doesn't match.

Throws:
ChameleonException
See Also:
http://www.interfaceware.com/manual/table_properties.html

getdouble

public double getdouble(int ColumnIndex,
                        int RowIndex)
                 throws ChameleonException
Get the double value at ColumnIndex and RowIndex. Throws an exception if the data type doesn't match.

Throws:
ChameleonException
See Also:
http://www.interfaceware.com/manual/table_properties.html

isNull

public boolean isNull(int ColumnIndex,
                      int RowIndex)
               throws ChameleonException
Check if the value at ColumnIndex and RowIndex is null.

Throws:
ChameleonException
See Also:
http://www.interfaceware.com/manual/is_null.html

getState

public int getState(int ColumnIndex,
                    int RowIndex)
             throws ChameleonException
Test the value in the cell at row RowIndex and column ColumnIndex to see if it is null, zero, empty or invalid.

Throws:
ChameleonException
See Also:
http://interfaceware.com/manual/is_null.html

toString

public final java.lang.String toString()
Convert the table data to a string.

Overrides:
toString in class java.lang.Object

handle

public long handle()
Get the table handle. This is used in the internal implementation of Chameleon and should not be invoked directly.


CHMtableCreate

protected long CHMtableCreate()
                       throws ChameleonException
Used in the internal implementation of Chameleon; should not be invoked directly.

Throws:
ChameleonException

CHMtableAddRef

protected void CHMtableAddRef(long TableHandle)
                       throws ChameleonException
Used in the internal implementation of Chameleon; should not be invoked directly.

Throws:
ChameleonException

CHMtableRelease

protected void CHMtableRelease(long TableHandle)
                        throws ChameleonException
Used in the internal implementation of Chameleon; should not be invoked directly.

Throws:
ChameleonException

CHMtableName

protected java.lang.String CHMtableName(long TableHandle)
                                 throws ChameleonException
Used in the internal implementation of Chameleon; should not be invoked directly.

Throws:
ChameleonException

CHMtableSubTable

protected long CHMtableSubTable(long TableHandle,
                                int RowIndex,
                                int TableIndex)
                         throws ChameleonException
Used in the internal implementation of Chameleon; should not be invoked directly.

Throws:
ChameleonException

CHMtableCountOfColumn

protected int CHMtableCountOfColumn(long TableHandle)
                             throws ChameleonException
Used in the internal implementation of Chameleon; should not be invoked directly.

Throws:
ChameleonException

CHMtableCountOfRow

protected int CHMtableCountOfRow(long TableHandle)
                          throws ChameleonException
Used in the internal implementation of Chameleon; should not be invoked directly.

Throws:
ChameleonException

CHMtableCountOfSubTable

protected int CHMtableCountOfSubTable(long TableHandle)
                               throws ChameleonException
Used in the internal implementation of Chameleon; should not be invoked directly.

Throws:
ChameleonException

CHMtableColumnType

protected int CHMtableColumnType(long TableHandle,
                                 int ColumnIndex)
                          throws ChameleonException
Used in the internal implementation of Chameleon; should not be invoked directly.

Throws:
ChameleonException

CHMtableColumnName

protected java.lang.String CHMtableColumnName(long TableHandle,
                                              int ColumnIndex)
                                       throws ChameleonException
Used in the internal implementation of Chameleon; should not be invoked directly.

Throws:
ChameleonException

CHMtableColumnIndex

protected int CHMtableColumnIndex(long TableHandle,
                                  java.lang.String ColumnName)
                           throws ChameleonException
Used in the internal implementation of Chameleon; should not be invoked directly.

Throws:
ChameleonException

CHMtableIsNull

protected boolean CHMtableIsNull(long TableHandle,
                                 int ColumnIndex,
                                 int RowIndex)
                          throws ChameleonException
Used in the internal implementation of Chameleon; should not be invoked directly.

Throws:
ChameleonException

CHMtableState

protected int CHMtableState(long TableHandle,
                            int ColumnIndex,
                            int RowIndex)
                     throws ChameleonException
Used in the internal implementation of Chameleon; should not be invoked directly.

Throws:
ChameleonException

CHMtableGetString

protected java.lang.String CHMtableGetString(long TableHandle,
                                             int ColumnIndex,
                                             int RowInde)
                                      throws ChameleonException
Used in the internal implementation of Chameleon; should not be invoked directly.

Throws:
ChameleonException

CHMtableGetDouble

protected double CHMtableGetDouble(long TableHandle,
                                   int ColumnIndex,
                                   int RowIndex)
                            throws ChameleonException
Used in the internal implementation of Chameleon; should not be invoked directly.

Throws:
ChameleonException

CHMtableGetInteger

protected int CHMtableGetInteger(long TableHandle,
                                 int ColumnIndex,
                                 int RowIndex)
                          throws ChameleonException
Used in the internal implementation of Chameleon; should not be invoked directly.

Throws:
ChameleonException

CHMtableGetDateTime

protected long CHMtableGetDateTime(long TableHandle,
                                   int ColumnIndex,
                                   int RowIndex)
                            throws ChameleonException
Used in the internal implementation of Chameleon; should not be invoked directly.

Throws:
ChameleonException

CHMtableSetString

protected void CHMtableSetString(long TableHandle,
                                 int ColumnIndex,
                                 int RowIndex,
                                 java.lang.String Value)
                          throws ChameleonException
Used in the internal implementation of Chameleon; should not be invoked directly.

Throws:
ChameleonException

CHMtableSetDouble

protected void CHMtableSetDouble(long TableHandle,
                                 int ColumnIndex,
                                 int RowIndex,
                                 double Value)
                          throws ChameleonException
Used in the internal implementation of Chameleon; should not be invoked directly.

Throws:
ChameleonException

CHMtableSetInteger

protected void CHMtableSetInteger(long TableHandle,
                                  int ColumnIndex,
                                  int RowIndex,
                                  int Value)
                           throws ChameleonException
Used in the internal implementation of Chameleon; should not be invoked directly.

Throws:
ChameleonException

CHMtableSetDateTime

protected void CHMtableSetDateTime(long TableHandle,
                                   int ColumnIndex,
                                   int RowIndex,
                                   long DateTimeHandleValue)
                            throws ChameleonException
Used in the internal implementation of Chameleon; should not be invoked directly.

Throws:
ChameleonException

CHMtableAddRow

protected void CHMtableAddRow(long TableHandle)
                       throws ChameleonException
Used in the internal implementation of Chameleon; should not be invoked directly.

Throws:
ChameleonException

CHMtableDump

protected java.lang.String CHMtableDump(long TableHandle)
                                 throws ChameleonException
Used in the internal implementation of Chameleon; should not be invoked directly.

Throws:
ChameleonException