Class symantec.itools.db.beans.binding.SingleRowBDSSupport
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class symantec.itools.db.beans.binding.SingleRowBDSSupport

Object
   |
   +----symantec.itools.db.beans.binding.SingleRowBDSSupport

public class SingleRowBDSSupport
extends Object
implements BasicDataSource, Serializable

This class provides support for single row BasicDataSource

Version:
1.0 06/05/98
Author:
Hristo Tonev
See Also:
BasicDataSource

Variable Index

 o mediatorDS
The MediatorDS object that will connect to the DataBus

Constructor Index

 o symantec.itools.db.beans.binding.SingleRowBDSSupport()
Constructor for use by derived BasicDataSource classes.
 o symantec.itools.db.beans.binding.SingleRowBDSSupport(Object)
Constructor for use when a BasicDataSource is delegating to us.

Method Index

 o addTriggerUIListener(TriggerUIListener)
Adds a listner for the trigger method of the data source.
 o getCurrentRowNumber()
 o getMediatorDS()
 o getTotalNumberOfRows()
The SQLAdapter can have at most 1 row of data So, the possible return values are only 0 and 1
 o getValue(int, int)
Gets the object stored in the JdbcStatementBDS with the coordinates row and col.
 o getValues()
 o getValues(int)
 o reInitDataItem(Name)
Method to re initialize the data item
 o removeTriggerUIListener(TriggerUIListener)
Removes a listner for the trigger mothod of the data source.
 o setDataBinding(Name)
Sets the binding name for the MediatorDS objects (the listeners)
 o setMediatorDS(MediatorDS)
Sets a new MediatorDS object
 o setValue(Object, int, int)
Sets the object
 o setValues(Object[])
 o setValues(int, Object)
 o triggerUI()
Triggers the Data Bus to send all changes back to the data consummers.

Variables

 o mediatorDS
protected transient symantec.itools.db.beans.binding.MediatorDS mediatorDS
The MediatorDS object that will connect to the DataBus

Constructors

 o SingleRowBDSSupport
public SingleRowBDSSupport()
Constructor for use by derived BasicDataSource classes.

 o SingleRowBDSSupport
public SingleRowBDSSupport(Object source)
Constructor for use when a BasicDataSource is delegating to us.

Parameters:
source - The source to use for any events we fire.

Methods

 o addTriggerUIListener
public synchronized void addTriggerUIListener(TriggerUIListener listener)
Adds a listner for the trigger method of the data source. Every data source sould be connected to only one mediatords therefore the vector of listeners should contain only one element. this vector of listeners is also used for setting the name of the mediatords's DataName.

Parameters:
listener - The TriggerUIListener to be added
 o getCurrentRowNumber
public int getCurrentRowNumber()
 o getMediatorDS
protected synchronized symantec.itools.db.beans.binding.MediatorDS getMediatorDS()

Returns:
The current mediatorDS object
 o getTotalNumberOfRows
public int getTotalNumberOfRows()
The SQLAdapter can have at most 1 row of data So, the possible return values are only 0 and 1

Returns:
the number of rows - either 0, or 1
 o getValue
public java.lang.Object getValue(int offset,
                                 int column)
Gets the object stored in the JdbcStatementBDS with the coordinates row and col.

Parameters:
offset - The current row, relative value.
column - The column value.
Returns:
The value of the object.
 o getValues
public synchronized java.lang.Object[] getValues()

Returns:
the values
 o getValues
public synchronized java.lang.Object getValues(int index)

Parameters:
index - The parameter index (0-based).
Returns:
the parameter value
 o reInitDataItem
protected void reInitDataItem(Name bindName)
Method to re initialize the data item

 o removeTriggerUIListener
public synchronized void removeTriggerUIListener(TriggerUIListener listener)
Removes a listner for the trigger mothod of the data source. every data source sould be connected to only one mediatords therefore the vector of listeners should contain only one element. this vector of listeners is also used for setting the name of the mediatords's DataName.

Parameters:
listener - The TriggerUIListener to be removed
 o setDataBinding
public synchronized void setDataBinding(Name bindName)
Sets the binding name for the MediatorDS objects (the listeners)

Parameters:
bindName - is the name that will be use for the Data Bus
 o setMediatorDS
protected synchronized void setMediatorDS(MediatorDS newMediatorDS)
Sets a new MediatorDS object

Parameters:
newMediatorDS - is a reference to the new object
 o setValue
public void setValue(Object newValue,
                     int offset,
                     int column)
Sets the object

Parameters:
newValue - The value of the object.
offset - The current row, relative value.
column - The column value. (0-based)
 o setValues
public synchronized void setValues(Object[] newValues)

Parameters:
newValues - is the vector with new values
 o setValues
public synchronized void setValues(int index,
                                   Object newValue)

Parameters:
index - is the parameter index (0-based).
newValue - is the value of the object.
 o triggerUI
public void triggerUI()
Triggers the Data Bus to send all changes back to the data consummers. The changes will always be in the current row (row 0) so there is no need to specify it in the method.


All Packages  Class Hierarchy  This Package  Previous  Next  Index