dsql.value
Class TableResult
java.lang.Object
dsql.DMExecuted
dsql.value.Value
dsql.value.NonScalarValue
dsql.value.TableResult
- All Implemented Interfaces:
- ColumnHolder, Cursor, RecordHolder
- Direct Known Subclasses:
- AbstractResults, ConstructedTable
- public abstract class TableResult
- extends NonScalarValue
- implements Cursor, ColumnHolder
A table, i.e. a complex value with rows and columns
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
primaryKeys
protected int[] primaryKeys
TableResult
public TableResult()
getTableName
public java.lang.String getTableName()
getColumnDisplaySize
public int getColumnDisplaySize(int i)
throws ExecuteException
- Specified by:
getColumnDisplaySize
in interface ColumnHolder
- Throws:
ExecuteException
getField
public java.lang.Object getField(java.lang.String name)
throws ExecuteException
- Access a column
- Overrides:
getField
in class NonScalarValue
- Throws:
ExecuteException
equalsRecord
public boolean equalsRecord(ColumnHolder r)
throws ExecuteException
- Throws:
ExecuteException
printRecord
public void printRecord(ASTPrint printer)
throws ExecuteException
- Specified by:
printRecord
in interface Cursor
- Throws:
ExecuteException
print
public void print(ASTPrint printer)
throws ExecuteException
- Description copied from class:
Value
- Print this value using printer
- Specified by:
print
in class Value
- Throws:
ExecuteException
getString
public java.lang.String getString()
throws ExecuteException
- In a string context, a TableResults returns the first
column of the first row of its first result
- Specified by:
getString
in class Value
- Returns:
- a string representation of this value, to be used
within dsql expressions. This is distinct from toString(),
which is used to output the object for debugging purposes.
- Throws:
ExecuteException
getBoolean
public boolean getBoolean()
throws ExecuteException
- Specified by:
getBoolean
in class Value
- Returns:
- true if has some records
- Throws:
ExecuteException
getPrimaryKeys
public int[] getPrimaryKeys()
throws ExecuteException
- Throws:
ExecuteException
setPrimaryKeys
public int[] setPrimaryKeys(java.lang.String[] keysStr)
throws ExecuteException
- Throws:
ExecuteException
setPrimaryKeys
public int[] setPrimaryKeys(int[] _keys)
findColumn
protected abstract int findColumn(java.lang.String label)
throws ExecuteException
- Throws:
ExecuteException
getMeta
public abstract ConstructedResults getMeta()
throws ExecuteException
- Specified by:
getMeta
in class Value
- Returns:
- meta-information about this Value, e.g. for a table,
it returns the names,types,width,etc. of its columns.
- Throws:
ExecuteException
insert
public abstract void insert(ColumnHolder rec)
throws ExecuteException
- Throws:
ExecuteException
deleteRecord
public abstract void deleteRecord()
throws ExecuteException
- Throws:
ExecuteException
update
public abstract void update(ColumnHolder rec)
throws ExecuteException
- Throws:
ExecuteException
getRecord
public Value getRecord()
throws ExecuteException
- Description copied from interface:
Cursor
- get current record; this could be the actual record,
as does XmlRecordHolder, or a "proxy" as does
TableResult
- Specified by:
getRecord
in interface Cursor
- Throws:
ExecuteException
getRecord
public Value getRecord(int i)
throws ExecuteException
- Specified by:
getRecord
in interface RecordHolder
- Returns:
- record at position i (first record is 1). For SQL cursors,
the returned Value can be a ProxyRecord
- Throws:
ExecuteException
setRecord
public void setRecord(int i,
Value val)
throws ExecuteException
- Specified by:
setRecord
in interface RecordHolder
- Throws:
ExecuteException
readCurrentRecord
public abstract java.lang.String[] readCurrentRecord()
throws ExecuteException
- Throws:
ExecuteException