Previous Next Contents Index


IRowSet2 interface

IRowSet2 is an extension to the javax.sql.RowSet interface. IRowSet2 includes a set of methods that are needed for some of the server's backend. In particular, this interface includes initialization methods and some "set" methods that associate a RowSet to a particular servlet request or servlet response.

Although anyone developing a NAS application can use IRowSet2, this interface is intended for use in components generated by Netscape Application Builder.

IRowSet2 replaces the IDataSet interface from NAB 3.0.

Package
com.netscape.server.servlet.extension

Methods
Method
Description
getName( )
Retrieves the name under which the RowSet is stored in the HttpServletRequest object.
init( )
Initializes the RowSet for execution.
initMetaInfo( )
Initializes the RowSet to match specific metadata.
setName( )
Sets the name of the RowSet.
setRequest( )
Sets the request for this RowSet.
setResponse( )
Sets the response for this RowSet.

Related Topics
javax.sql.RowSet interface

getName( )
Retrieves the name under which the RowSet is stored in the HttpServletRequest object.

Syntax
public abstract String getName()
Usage
Use getName( ) to retrieve the name of a RowSet. If the RowSet is built over the ITemplateData interface, then the retrieved name is also the group name.

Related Topics
setName( ),
setAttribute( ) in class javax.servlet.http.HttpServletRequest,
ITemplateData interface

init( )
Initializes the RowSet for execution.

Syntax
public abstract void init()
Usage
Use init( ) to initialize the RowSet. For example, you can call init( ) to load a query from a file.

Related Topics
initMetaInfo( ),
DBRowSet class

initMetaInfo( )
Initializes the RowSet to match specific metadata.

Syntax
public boolean initMetaInfo(
	OrderedHash metaData) throws SQLException

metaData. An OrderedHash of NTV properties. The RowSet will be initialized with these properties.

Usage
Use initMetaInfo( ) to initialize a RowSet. This method is called by BaseUtils.initRowSets( ) when the RowSet is created.

The metaData parameter specifies the properties stored in a method in the NTV list. The properties specify the query file name, the query name, the connection name, and the input bindings for the query parameters. In this way, the RowSet is initialized so as to match the properties stored in the NTV-list method.

The initMetaInfo( ) method must be called when the RowSet is constructed; that is, before init( ). For example, you can call initMetaInfo( ) to set the filename and query for a subsequent query-load.

Return Value
Returns false if initialization fails.

setName( )
Sets the name of the RowSet.

Syntax
public abstract void setName(
	String newName)

newName. The name you want to call this RowSet.

Usage
Use setName( ) to set the name of the RowSet. This method must be called when the RowSet is constructed. You can also use getName( ) to retrieve the name of the RowSet.

Note that the setName( ) method does not store the RowSet into the request under the name specified in this call.

Related Topics
getName( )

setRequest( )
Sets the request for this RowSet.

Syntax
public abstract void setRequest(
	HttpServletRequest request)

request. The HttpServletRequest object.

Usage
Use setRequest( ) and setResponse( ) to set the request and response objects for this RowSet. These methods must be called when the RowSet is constructed. Calling these methods will associate the RowSet with a particular servlet request or servlet response.

Related Topics
setResponse( )

setResponse( )
Sets the response for this RowSet.

Syntax
public abstract void setResponse(
	HttpServletResponse response)

response. The HttpServletResponse object.

Usage
Use setRequest( ) and setResponse( ) to set the request and response objects for this RowSet. These methods must be called when the RowSet is constructed. Calling these methods will associate the RowSet with a particular servlet request or servlet response.

Related Topics
setRequest( )

 

© Copyright 1999 Netscape Communications Corp.