BEA Systems, Inc.

WebLogic Server 5.1.0 API Reference

weblogic.db.jdbc
Class EventfulTableDataSet

java.lang.Object
  |
  +--weblogic.db.jdbc.DataSet
        |
        +--weblogic.db.jdbc.TableDataSet
              |
              +--weblogic.db.jdbc.EventfulTableDataSet

public class EventfulTableDataSet
extends TableDataSet
implements ActionDef

An EventfulTableDataSet is a dbKona TableDataSet that sends and receives events when its data is updated locally or in the DBMS. This class implements weblogic.event.actions.ActionDef; its action method updates the DBMS.

Author:
Copyright (c) 1996-1998 by WebLogic, Inc. All Rights Reserved., Copyright (c) 1998-1999 by BEA Systems, Inc. All Rights Reserved.
Copyright © 2000 BEA Systems, Inc. All Rights Reserved.
See Also:
KeyDef, TableDataSet, SelectStmt, EventfulRecord, Serialized Form

Fields inherited from class weblogic.db.jdbc.TableDataSet
keydefval
 
Fields inherited from class weblogic.db.jdbc.DataSet
cached, resetable, resultval, stmt
 
Constructor Summary
EventfulTableDataSet(T3Client t3, java.sql.Connection conn, java.lang.String tablename, KeyDef key)
          Constructs an EventfulTableDataSet.
EventfulTableDataSet(T3Client t3, java.sql.Connection conn, java.lang.String tablename, java.lang.String attributes, KeyDef key)
          Constructs an EventfulTableDataSet.
 
Method Summary
 void action(EventMessageDef ev)
          The action method that is invoked by the WebLogic Server when an EventfulRecord sends an event message that it has changed.
 Record addRecord()
          Adds an EventfulRecord to an EventfulTableDataSet.
 void addToRecords(java.lang.String uniqueKey, Record record)
           
 KeyDef getKeyDef()
          Get the KeyDef assocciated with an EventfulTableDataSet.
 Record lookupRecord(java.lang.String uniqueKey)
          Returns the Record that matches the specified unique key.
 void registerInit(ParamSet params)
          Internal use only.
 void setEventfulObject(ActionDef action)
          Sets the action object that is invoked when one of the EventfulRecords in an EventfulTableDataSet is changed.
 void setServices(T3ServicesDef services)
          Internal use only.
 
Methods inherited from class weblogic.db.jdbc.TableDataSet
attributes, debugInfo, fetchRecords, getSelectString, keydef, optimisticLockingCol, order, orderstr, other, refresh, refreshOnSave, removeDeletedRecords, resultSet, save, save, save, saveWithoutStatusUpdate, schema, selectStmt, setOptimisticLockingColumn, setRefreshOnSave, tableName, tableQualifier, updateStatus, where
 
Methods inherited from class weblogic.db.jdbc.DataSet
allRecordsRetrieved, clearRecords, close, connection, containsRecord, destroy, fetchRecords, fetchRecords, getRecord, getResultSet, initialize, lastFetchSize, maxColumnWidths, readObject, releaseRecords, removeRecord, reset, size, toString, writeObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EventfulTableDataSet

public EventfulTableDataSet(T3Client t3,
                            java.sql.Connection conn,
                            java.lang.String tablename,
                            KeyDef key)
                     throws java.sql.SQLException,
                            DataSetException,
                            EventRegistrationException
Constructs an EventfulTableDataSet. An EventfulTableDataSet requires a KeyDef for updates, deletes, and inserts.

Parameters:
t3 - T3Client
conn - JDBC Connection
tablename - DBMS table for creating an EventfulTableDataSet
key - KeyDef that defines the unique key for saving changes to records in the DBMS table
Throws:
java.sql.SQLException - if there is a SQL error
DataSetException - if there is an error
EventRegistrationException - if there is an error
See Also:
TableDataSet, EventfulRecord, ActionDef

EventfulTableDataSet

public EventfulTableDataSet(T3Client t3,
                            java.sql.Connection conn,
                            java.lang.String tablename,
                            java.lang.String attributes,
                            KeyDef key)
                     throws DataSetException,
                            java.sql.SQLException,
                            EventRegistrationException
Constructs an EventfulTableDataSet. An EventfulTableDataSet requires a KeyDef for updates, deletes, and inserts. You can specify a subset of the columns in the DBMS table as a comma-delimited String, as in "empname, empno, empdept" to construct an EventfulTableDataSet that is made up of those three columns from the DBMS table "empdemo."

Parameters:
t3 - T3Client
conn - JDBC Connection
tablename - DBMS table for creating an EventfulTableDataSet
attributes - Subset of the columns in the DBMS table to use for creating an EventfulTableDataSet
key - KeyDef that defines the unique key for saving changes to records in the DBMS table
Throws:
java.sql.SQLException - if there is a SQL error
DataSetException - if there is an error
EventRegistrationException - if there is an error
See Also:
TableDataSet, EventfulRecord, ActionDef
Method Detail

getKeyDef

public KeyDef getKeyDef()
Get the KeyDef assocciated with an EventfulTableDataSet.


setEventfulObject

public void setEventfulObject(ActionDef action)
Sets the action object that is invoked when one of the EventfulRecords in an EventfulTableDataSet is changed. The action object implements weblogic.event.actions.ActionDef.

Parameters:
action - Action object that defines the response of an EventfulTableDataSet when it receives an event message that one of its EventfulRecords has been changed

setServices

public void setServices(T3ServicesDef services)
Internal use only.
Specified by:
setServices in interface ActionDef


registerInit

public void registerInit(ParamSet params)
Internal use only.
Specified by:
registerInit in interface ActionDef


action

public void action(EventMessageDef ev)
The action method that is invoked by the WebLogic Server when an EventfulRecord sends an event message that it has changed.
Specified by:
action in interface ActionDef

Parameters:
ev - EventMessage

addRecord

public Record addRecord()
                 throws DataSetException,
                        java.sql.SQLException
Adds an EventfulRecord to an EventfulTableDataSet.

Returns:
EventfulRecord added to the EventfulTableDataSet
Throws:
DataSetException - if there is an error
java.sql.SQLException - if there is a SQL error
Overrides:
addRecord in class DataSet
See Also:
DataSet.addRecord()

lookupRecord

public Record lookupRecord(java.lang.String uniqueKey)
Returns the Record that matches the specified unique key. This method allows other objects to look up records by key.

Parameters:
uniqueKey - Unique key that identifies the Record of interest in an EventfulTableDataSet
Returns:
Record

addToRecords

public void addToRecords(java.lang.String uniqueKey,
                         Record record)


Documentation is available at
http://www.weblogic.com/docs51