Skip navigation.

Beehive Integration in WebLogic Server 9.0

  Previous Next vertical dots separating previous/next from contents/index/pdf Contents Index View as PDF   Get Adobe Reader

Annotation for Rowsets

 


SQLRowSet

The SQLRowSet metadata annotation has been added in WebLogic Server 9.0. SQLRowSet is a method-level annotation that supports RowSet functionality. It has the following members.

SQLRowSet Members

Member Name

Type

Required

Use

Values

commandType

CommandType

No

RowSet command to execute

CommandType.NONE (default)

CommandType.GRID

CommandType.DETAIL

CommandType.UPDATE

CommandType.INSERT

CommandType.DELETE

CommandType.TEMPLATE_ROW

CommandType.INSERTED_ROW

CommandType.NEW_KEY

rowsetName

String

No

Name of RowSet object

Default: empty string

rowsetSchema

String

No

XML schema name

Default: empty string

 


Example

The sample code described in this section is intended to be included in a JDBC control file. For information about such files, see http://beehive.apache.org.

Include the following code in your control file:

@SQLRowSet(commandType = com.bea.control.JdbcControl.CommandType.NONE, rowsetName="aRowSet")
@JdbcControl.SQL(statement="SELECT * FROM WEBLOGIC.VISITORS_CONTROL")
public RowSet getRowSet() throws SQLException;

Suppose your control file is named JdbcControlSample.jcx. An instantiable Java class named JdbcControlSample.class will be generated, containing a method named getRowSet() that returns a RowSet object populated with the results of executing the SQL statement shown in the sample code.

You could use this functionality as follows:

@Control() protected JdbcControlSample myCtl;
try {
    RowSet rs = myCtl.getRowSet();
    . . .
} catch (Exception e) {
    . . .
}

 


Usage Restrictions

The following rules govern the use of this annotation:

 

Skip navigation bar  Back to Top Previous Next