Progress
Open Client
Developer’s Guide
Miscellaneous Management Methods
These methods facilitate various management functions on an SDOResultSet, and include standard JDBC 2 methods and extensions to manage SmartDataObjects.
Standard JDBC 2 Management Methods
The supported standard JDBC 2 management methods include:
Closes the SDOResultSet and releases the underlying SmartDataObject. Any local modifications that have not been sent to the AppServer are lost when this method is called.
Returns the SDOResultSetMetaData object, which is an extension of the JDBC ResultSetMetaData object.
Gets the latest version of the current row from the database.
Indicates if the last fetched value from a
get
Datatype
()
method equal to the 4GL unknown value (?).This method is especially useful for methods that return a primitive data type, as in this example where SDOResults is an SDOResultSet:
Because a primitive data type cannot hold the
null
value (the Java object equivalent to the 4GL unknown value (?)),wasNull()
provides the equivalent for theint
value returned bygetInt()
. In this example, the method fragment returns the value –1 for a 4GL unknown value (?) because valid integer values for the QUANTITY column must be positive.
Returns the column index.
Returns the size (in number of rows) of the buffer the underlying implementation uses to fetch rows from the AppServer.
SmartDataObject Management Methods [Extension]
The following nonstandard SDOResultSet methods support a variety of features unique to SmartDataObject management.
NOTE: The rowId value referenced in the following methods is equivalent to the value returned by the 4GL ROWID function and theSDOResultSet.getRowIdentity()
method. For more information on ROWID, see the Progress Programming Handbook (or the Progress DataServer Guide for any DataServer accessed by the SmartDataObject).
Reopens the SmartDataObject query and positions the cursor before the first row. This method refreshes all the data in the SDOResultSet, makes all of the newly inserted rows visible, and removes all of the deleted rows. Any local modifications that you have not sent to the AppServer before you call this method are lost.
Works like
reOpenQuery()
, but the first row returned is the one specified by rowId. A null rowId is equivalent toreOpenQuery()
. It is usually more efficient to callreOpenQuery(String
rowId
) than to callreOpenQuery()
, then callabsolute(String
rowId
) in order to reposition on the specified row.NOTE: If the SDOResultSet is inSDOScrollingMode.PREFETCH
mode, you cannot get the rows before this
rowId
. For more information onSDOScrollingMode.PREFETCH
, see the "Understanding SDOResultSet Scrolling Modes" section.
Gets the string representation of the ROWID value for the current row that can be used as input to
reOpenQuery(String
rowId
),absolute(String
rowId
), andSDOParameters.setRowIdentity(String
rowId
).
Returns the 4GL query that populated this SDOResultSet object.
Repositions the cursor at the row specified by
rowId
.
Provides direct access to the underlying 4GL methods of the SmartDataObject that are efficient for remote SmartDataObject access. The returned SDOInterface is a ProcObject that includes all of the relevant public methods provided by the SmartDataObject. Thus, you have full access to these SmartDataObject features without any limit imposed by the SDOResultSet interface. If the SDOResultSet is
Stateless
, callinggetSDOInterface()
creates a remote SmartDataObject procedure that you can delete only by callingreleaseSDOInterface()
. CallingreleaseSDOInterface()
on a nonStateless
SDOResultSet has no effect. The actual SmartDataObject methods supported through SDOInterface include:For more information on these SmartDataObject methods, see the Progress ADM 2 Guide and the Progress ADM 2 Reference .
NOTE: A typical application does not require access to the SDOInterface directly. Direct access to SmartDataObject methods requires expert knowledge of SmartDataObject internals. In some cases, mixing direct calls to the SmartDataObject with calls through the SDOResultSet interface can leave the SDOResultSet in an unexpected state. Thus, use the SDOInterface directly only after carefully analyzing the alternatives.
On a
Stateless
SDOResultSet, releases the remote SmartDataObject procedure. CallingreleaseSDOInterface()
on an SDOResultSet that is notStateless
has no effect. This method is used in conjunction withgetSDOInterface()
.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |