SilverStream
Application Server 3.5

com.sssw.srv.busobj
Class AgaData

java.lang.Object
 |
 +--com.sssw.rt.util.AgoRowCursor
       |
       +--com.sssw.rt.util.AgoData
             |
             +--com.sssw.srv.busobj.AgaData
All Implemented Interfaces:
AgiRowCursor, AgiRowCursorSort, AgiRowCursorViewSupport, AgiRowSetEventProducer, AgiRowSetListener, AgiRowSetManager, Cloneable

public class AgaData
extends AgoData

Mechanism for accessing data from a SilverStream triggered business object. A dataset is made available to a triggered object at design time by clicking the database icon in the Business Objects Designer.

Once the dataset is selected, the property inspector is used to define the source for the dataset. The source can be any relational table that is accessible using JDBC. It can also be a business object with a Data Source trigger.


Fields inherited from class com.sssw.rt.util.AgoRowCursor
m_cursor
 
Constructor Summary
AgaData()
           
 
Method Summary
 void initialize(String name, AgiDatabase db)
          Used to initialize a "standalone" AgaData being used from a SilverStream business object or utility class in a SilverStream server.
 void initialize(String name, EJBContext ctxt)
          Used to initialize a "standalone" AgaData being used from an Enterprise Java Bean -- either a Session Bean or a bean-managed Entity Bean.
 Object invokeQuery()
          Invoke the business object for which this is a proxy.
 Object invokeQuery(Serializable param)
          Invoke the business object for which this is a proxy.
 void setAutoCloseAfterEvent(boolean value)
          Allows you to control whether an AgData Object closes or stays open after a related event(s) fires.
 
Methods inherited from class com.sssw.rt.util.AgoData
close, setDataSource
 
Methods inherited from class com.sssw.rt.util.AgoRowCursor
addAgiRowCursorListener, addAgiRowSetListener, allowsChildren, appendChild, copy, cursorChanged, cursorPreChange, delete, equals, getChildEntryCount, getCursor, getDisplayEntryNumber, getProperty, getProperty, getPropertyCount, getPropertyIndex, getPropertyName, getRowSetEventProducer, gotoChild, gotoFirst, gotoLast, gotoNext, gotoParent, gotoPrevious, gotoRoot, hasChildren, insertAfter, insertBefore, makePrimaryVersion, removeAgiRowCursorListener, removeAgiRowSetListener, setCursor, setDisplayEntryNumber, setProperty, setProperty, setRowCursorSupport, setRowSetSupport, validateCursor
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods implemented from interface com.sssw.rt.util.AgiRowCursorSort
rowCursorSort
 
Methods implemented from interface com.sssw.rt.event.AgiRowSetListener
dataReceivedAsync, dataReloaded, rowDataChanged, rowDeleted, rowInserted, rowPreDelete, rowPreInsert
 
Methods implemented from interface com.sssw.rt.util.AgiRowSetManager
clearRows, haveRowsChanged, query, query, refreshRows, updateRows
 

Constructor Detail

AgaData

public AgaData()
Method Detail

initialize

public void initialize(String name,
                       EJBContext ctxt)
                throws Exception
Used to initialize a "standalone" AgaData being used from an Enterprise Java Bean -- either a Session Bean or a bean-managed Entity Bean. This standalone AgaData can only be used to access data from a Data Source Object, using the setDataSource() method, which must be called after the AgaData is initialized. The argument is the EJB Context in which the EJB is being run, and the name of the AgaData being created (must be unique within this EJB).
Parameters:
name - Name to be used for this AgaData
ctxt - The EJB context in which this EJB is running
Throws:
if - an unexpected exception occurs

initialize

public void initialize(String name,
                       AgiDatabase db)
                throws Exception
Used to initialize a "standalone" AgaData being used from a SilverStream business object or utility class in a SilverStream server. This standalone AgaData can only be used to access data from a Data Source Object, via the setDataSource() method (which must be called after the AgaData is initialized). The arguments are the AgiDatabase in which the caller resides, plus the name of the AgaData being created.
Parameters:
name - Name to be used for this AgaData
db - The caller's database
Throws:
Exception - if an unexpected exception occurs

setAutoCloseAfterEvent

public void setAutoCloseAfterEvent(boolean value)
Allows you to control whether an AgData Object closes or stays open after a related event(s) fires.
Parameters:
true - if this AgaData should be automatically closed after all related events.
Usage:
Normally AgaDatas are closed at the end of any related events which frees up considerable resources on the server. This means that they cannot be used after the event. (Most events are unrelated, like invoked or scheduleReached they are fired individually, but others like mail and table have several related events which typically end with an "after" event.)

If you want to use one after a set of related events completes (by saving it in an instance variable) you should call this method with a parameter of false so that it is not closed automatically after the event. The default behavior is as if this method was called with a parameter of true.


invokeQuery

public Object invokeQuery()
                   throws Exception
Invoke the business object for which this is a proxy. If it succeeds, initialize the datastore with the resulting data source.

invokeQuery

public Object invokeQuery(Serializable param)
                   throws Exception
Invoke the business object for which this is a proxy. If it succeeds, initialize the datastore with the resulting data source.
Parameters:
param - any data that the business object might need

SilverStream
Application Server 3.5