borland Packages  Class Hierarchy  internetbeans Package 

TupleModel interface

com.borland.internetbeans.TupleModel

About the TupleModel interface

Variables  Methods  

Implemented by DataModuleTupleModel, DataSetTupleModel

Note: This is a feature of JBuilder Professional and Enterprise.

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.


TupleModel variables

Variables defined in this interface

TupleModel methods

Methods defined in this interface


TupleModel variables

ATTRIBUTE_KEY

  static final String ATTRIBUTE_KEY = TupleModel.class.getName()

UNRESOLVED_ORDINAL

  static final int UNRESOLVED_ORDINAL = -1

TupleModel methods

beginRead()

  void beginRead()
Called just before the reading of the elements in the set commences.

beginWrite()

  void beginWrite()
Called before the writing of the elements in the set commences.

destroy()

  void destroy()
Called when model is no longer needed, to allow for the explicit release of resources, such as database connections.

endRead()

  void endRead()
Called after reading of the elements in the set is complete.

endWrite()

  void endWrite()
Called after writing of the elements in the set is complete.

getObject(int)

  Object getObject(int ordinal)
Returns a value from the set as a object.

Parameters:

ordinal
Zero-based number for element
Returns element value as a object, may be null.

getObject(java.lang.String)

  Object getObject(String name)
Returns the named value from the set as an object.

Parameters:

name
Name of element

Returns element value as an object, may be null.

getString(int)

  String getString(int ordinal)
Returns a value from the set as a string.

Parameters:

ordinal
Zero-based number for element

Returns element value as a string, may be null.

getString(java.lang.String)

  String getString(String name)
Returns the named value from the set as a string.

Parameters:

name
Name of element

Returns element value as string, may be null.

getTable(int)

  javax.swing.table.TableModel getTable(int ordinal)
Returns a TableModel for a nested set.

Parameters:

ordinal
Zero-based number for set
Returns set as TableModel, may be null.

getTable(java.lang.String)

  javax.swing.table.TableModel getTable(String name)
Returns a TableModel for the named nested set.

Parameters:

name
Name of set

Returns set as TableModel, may be null.

init(binder)

  void init(Binder binder)
Called before actual read/write usage or replication to allow for initialization.

Parameters:

binder
The Binder for which the TupleModel is being used, through which the desired items (columns) can be retrieved

replicate()

  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.

setObject(int, java.lang.Object)

  void setObject(int ordinal, Object value)
Sets a value in the set.

Parameters:

ordinal
Zero-based number for element
value
New value, may be null

setObject(java.lang.String, java.lang.Object)

  void setObject(String name, Object value)
Sets the named value in the set.

Parameters:

name
Name of element
value
New value, may be null

setString(int, java.lang.String)

  void setString(int ordinal, String value)
Sets a value in the set.

Parameters:

ordinal
Zero-based number for element
value
New value, may be null

setString(java.lang.String, java.lang.String)

  void setString(String name, String value)
Sets the named value in the set.

Parameters:

name
Name of element
value
New value, may be null