dsql.value
Class ConstructedTableHash

java.lang.Object
  extended bydsql.DMExecuted
      extended bydsql.value.Value
          extended bydsql.value.NonScalarValue
              extended bydsql.value.TableResult
                  extended bydsql.value.ConstructedTable
                      extended bydsql.value.ConstructedTableHash
All Implemented Interfaces:
ColumnHolder, Cursor, RecordHolder

public class ConstructedTableHash
extends ConstructedTable


Field Summary
protected  java.util.Hashtable hash
           
 
Fields inherited from class dsql.value.TableResult
primaryKeys
 
Constructor Summary
ConstructedTableHash(DSQL _caller, java.lang.String[] labels)
          hash table of all records; key is record, value is index in the records array
ConstructedTableHash(TableResult source)
          make a copy of source
 
Method Summary
 void addRecord(RecordHash rechash)
           
 void addRecord(java.lang.String[] record)
           
 boolean exists(RecordHash record)
           
 boolean existsAllFields(RecordHash record)
           
 RecordHash getNewRecordHash(java.lang.String[] record)
           
 
Methods inherited from class dsql.value.ConstructedTable
currentRecord, deleteRecord, findColumn, getColumn, getColumn, getColumnCount, getColumnDisplaySize, getColumnLabel, getColumnString, getColumnString, getMeta, getPrimaryKeys, getRecordCount, getTableName, gotoRecord, insert, insert, nextRecord, readCurrentRecord, reset, setId, setMetaLocal, toString, update, update
 
Methods inherited from class dsql.value.TableResult
equalsRecord, getBoolean, getField, getRecord, getRecord, getString, print, printRecord, setPrimaryKeys, setPrimaryKeys, setRecord
 
Methods inherited from class dsql.value.NonScalarValue
getFields, isScalar, setField
 
Methods inherited from class dsql.value.Value
getFloat, getInt, getObject, getObjectClass, getRecordHolder, getType, getValue, getValue
 
Methods inherited from class dsql.DMExecuted
getCaller, setCaller
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

hash

protected java.util.Hashtable hash
Constructor Detail

ConstructedTableHash

public ConstructedTableHash(DSQL _caller,
                            java.lang.String[] labels)
hash table of all records; key is record, value is index in the records array


ConstructedTableHash

public ConstructedTableHash(TableResult source)
                     throws ExecuteException
make a copy of source

Method Detail

getNewRecordHash

public RecordHash getNewRecordHash(java.lang.String[] record)
                            throws ExecuteException
Throws:
ExecuteException

addRecord

public void addRecord(java.lang.String[] record)
               throws ExecuteException
Overrides:
addRecord in class ConstructedTable
Throws:
ExecuteException

addRecord

public void addRecord(RecordHash rechash)
               throws ExecuteException
Throws:
ExecuteException

exists

public boolean exists(RecordHash record)
Returns:
true if the specified record is in this table. If a primary key has been specified, will look only at the primary key fields, i.e. this method might return true even if other fields differ. To also check for non-primary fields (e.g. inter and minus operations) use existsAllFields

existsAllFields

public boolean existsAllFields(RecordHash record)
                        throws ExecuteException
Throws:
ExecuteException