borland Packages Class Hierarchy internetbeans Package
com.borland.internetbeans.TupleModel
Variables Methods
Implemented by DataModuleTupleModel, DataSetTupleModel
Represents a set of data, such as a row from dataSet, or properties in a bean. The elements are accessed via name or ordinal number.
Note in the case of something like a dataSet, which most likely has more than one row of data, the TupleModel
represents only one row at a time. As navigation occurs in the dataSet that backs the model, the model will read from and write to the current row.
The set may contain singly-nested table sets. For example, with a teachers-classes-students database, the tuple would be an individual teacher and the nested table set of that teacher's classes. You could not represent the students in all those classes unless you did a join; that is, you cannot nest the set of students in the nested set of classes.
static final String ATTRIBUTE_KEY = TupleModel.class.getName()
static final int UNRESOLVED_ORDINAL = -1
void beginRead()Called just before the reading of the elements in the set commences.
void beginWrite()Called before the writing of the elements in the set commences.
void destroy()Called when model is no longer needed, to allow for the explicit release of resources, such as database connections.
void endRead()Called after reading of the elements in the set is complete.
void endWrite()Called after writing of the elements in the set is complete.
Object getObject(int ordinal)Returns a value from the set as a object.
ordinal
Object getObject(String name)Returns the named value from the set as an object.
name
Returns element value as an object, may be null.
String getString(int ordinal)Returns a value from the set as a string.
ordinal
Returns element value as a string, may be null.
String getString(String name)Returns the named value from the set as a string.
name
Returns element value as string, may be null.
javax.swing.table.TableModel getTable(int ordinal)Returns a TableModel for a nested set.
javax.swing.table.TableModel getTable(String name)Returns a TableModel for the named nested set.
name
Returns set as TableModel, may be null.
void init(Binder binder)Called before actual read/write usage or replication to allow for initialization.
binder
Binder
for which the TupleModel
is being used, through which the desired items (columns) can be retrieved
TupleModel replicate()Instances must be able to provide replicas of themselves suitable for multi-threaded multi-session use. This can be done through cloning (probably deep cloning), copy constructors, factories, or whatever implementation is reasonable.
void setObject(int ordinal, Object value)Sets a value in the set.
ordinal
value
void setObject(String name, Object value)Sets the named value in the set.
name
value
void setString(int ordinal, String value)Sets a value in the set.
ordinal
value
void setString(String name, String value)Sets the named value in the set.
name
value