Oracle Data-aware Controls Reference

oracle.dacf.dataset
Class ResultSetInfo

java.lang.Object
  extended byoracle.dacf.dataset.DacObject
      extended byoracle.dacf.dataset.ProducerObject
          extended byoracle.dacf.dataset.InfoObject
              extended byoracle.dacf.dataset.ResultSetInfo
All Implemented Interfaces:
java.lang.Cloneable, oracle.dacf.dataset.QueryCriteriaStoreListener
Direct Known Subclasses:
LOVRowSetInfo, RowSetInfo

public class ResultSetInfo
extends InfoObject
implements java.lang.Cloneable, oracle.dacf.dataset.QueryCriteriaStoreListener

This class contains all of the dataset specific properties and validators. It also establishes the correlation between the ScrollableRowsetAccess DataItem and the server-side RowSet. It also serves as a base class for rowset based data producers.

Version:
SDK: since JDeveloper 3.0

Field Summary
protected static int _SPECIAL_ATTR_CNT
           
protected  oracle.jbo.ViewObject _viewObj
           
static java.lang.String CURMSG_ATTR_NAME
           
static java.lang.String CURROW_ATTR_NAME
           
static int DEFAULT_BUFFER_SIZE
          The default number of rows to be retrieved at one time.
static java.lang.String DEFAULT_QUERYCRITERIA_ATTR_NAME
           
protected static java.lang.String ERR_PROD_CODE
           
static java.lang.String HIGH_ATTR_NAME
           
static java.lang.String MODIFIED_ATTR_NAME
           
static java.lang.String QUERYCRITERIA_ATTR_NAME
           
static java.lang.String ROWCNT_ATTR_NAME
           
 
Fields inherited from class oracle.dacf.dataset.InfoObject
_updateMode, LEVEL_APPLICATION, LEVEL_ATTRIBUTE, LEVEL_COLUMN, LEVEL_QUERY_VIEW, LEVEL_ROOT, LEVEL_ROW, LEVEL_ROWSET, LEVEL_SESSION, PROPERTIES_COLUMN_NAME, UPDATEABLE_FALSE, UPDATEABLE_MAX_VAL, UPDATEABLE_TRUE, UPDATEABLE_UNDEFINED
 
Fields inherited from class oracle.dacf.dataset.ProducerObject
_openLock
 
Fields inherited from class oracle.dacf.dataset.DacObject
EMPTY_PREFIX, INITIAL_CAPACITY, ITEMNAME_DELIMITER
 
Constructor Summary
ResultSetInfo()
           
ResultSetInfo(java.lang.String queryViewName)
           
 
Method Summary
 void addAttribute(ColumnInfo col)
          Add a column to the ResultSetInfo.
 void addQueryListener(QueryListener ql)
           
 void attributeChanged(java.lang.String name, int rowIndex, java.lang.Object oldValue)
           
 java.lang.Object clone()
          Creates a deep copy of the ResultSetInfo, including the children.
protected  void closeCheck()
          Checks to see if close is permitted.
protected  void closeChildren()
          A subclass specific method for disconnecting the child objects from their server objects counterparts.
protected  void closeDataItems()
          A subclass specific method for disconnecting and revoking Dataitems Internal to the framework; should never be called by client classes
protected  void closeProducerObject()
          Close down the ResultSetInfo.
protected  void createAssociation()
          A hook for derived class to create an association
protected  ProducerObject createChild(java.lang.String childName)
          Creates a child ColumnInfo, StatusInfo or QueryCriteriaProperty.
protected  oracle.jbo.AttributeDef createDynamicAttribute(java.lang.String name)
          Creates a dynamic attribute in the BC4J ViewObject.
protected  oracle.jbo.AttributeDef createDynamicAttributeInternal(java.lang.String name)
           
protected  void destroyAssociation()
          A hook for derived class to remove an association
 void executeQuery()
          Execute or re-execute the underlying query.
protected  void findViewLinks()
          Discovers all ViewAccessor attributes defined in the ViewObject.
 ColumnInfo getAttribute(int colIndex)
          Return the ColumnInfo that corresponds to the column index.
 ColumnInfo getAttribute(java.lang.String name)
          Return the ColumnInfo that corresponds to the column name.
 int getAttributeCount()
          Return the number ColumnInfo objects within the ResultSetInfo.
 ColumnInfo[] getAttributeInfo()
          Returns the AttributeInfo objects representing the columns returned by the query.
protected  int getChildIndex(java.lang.String childName)
          Returns the index of this DacObject's specified child.
protected  javax.infobus.DataItem getDataItem()
          Returns that DataItem for this RowSet.
 java.lang.String getQueryCondition()
          Retrieve the current WHERE clause of the query statement for the ViewObject.
 java.lang.Object[] getQueryConditionParams()
          retrieve the bind variable values to use with the condition.
 QueryCriteria getQueryCriteria()
          Returns the QueryCriteria to be used when executing queries.
 Query getQueryInfo()
          Returns the QueryInfo object for the ResultSetInfo.
 QueryListener[] getQueryListeners()
           
 boolean getQueryOnOpen()
          Returns if the underlying query is automatically executed.
 java.lang.String getQueryOrderbyClause()
          Retrieve the current ORDER BY clause of the query statement for the ViewObject.
 int getRangeSize()
          Returns the desired size of the fetch buffer.
 javax.infobus.ScrollableRowsetAccess getRowsetAccess()
          Returns ScrollableRowsetAccess interface published.
 SessionInfo getSession()
          return the session associated with this ResultSetInfo
protected  oracle.jbo.ViewObject getViewObject()
          Returns the server-side ViewObject associated with this ResultSetInfo.
protected  boolean isSpecialItemName(java.lang.String name)
           
 boolean isUpdateable()
          Returns the updateable property value.
 void mapRowsetAccess(javax.infobus.ScrollableRowsetAccess target)
          Maps the ScrollableRowsetAccess interface.
 void navigated(int oldCurrent, int newCurrent)
           
 void open(boolean openChildren)
          Sets up the ResultSetInfo for use by: connect to the server-side ApplicationModule if defined connect to the server-side RowSet executes open() on all child ColumnInfo It throws an IllegalStateException exception if required properties aren't set.
protected  void openChildren()
          Causes all child objects to be opened.
protected  void openDataItems()
          Setups up the DataItems that will be published.
protected  void openProducerObject()
          Sets up the ResultSetInfo for use by: connect to the server-side ApplicationModule if defined connect to the server-side RowSet executes open() on all child ColumnInfo It throws an IllegalStateException exception if required properties aren't set.
protected  void openRowSet()
          Convienence function for calling open().
 void removeAttribute(ColumnInfo col)
          remove a column from the ResultSetInfo.
 void removeQueryListener(QueryListener ql)
           
 void rowsAdded(int rowIndex, int count)
           
 void rowsChanged(int rowIndex, int count)
           
 void rowsDeleted(int rowIndex, int count)
           
 void setAttributeInfo(ColumnInfo[] kids)
          An alternative way to add child ColumnInfo objects
 void setQueryCondition(java.lang.String cond)
          Specify the Where clause of the query statement for the ViewObject.
 void setQueryConditionParams(java.lang.Object[] params)
          Specify the bind variable values to use with the condition.
 void setQueryCriteria(QueryCriteria queryCriteria)
          Sets the QueryCriteria to be used when executing queries.
 void setQueryInfo(Query info)
          Set the QueryInfo object for the ResultSetInfo.
 void setQueryOnOpen(boolean queryOnOpen)
          Determines if the underlying query is automatically executed.
 void setQueryOrderbyClause(java.lang.String orderBy)
          Specify the ORDER BY clause of the query statement for the ViewObject.
 void setRangeSize(int nuRangeSize)
          Sets the size of the fetch buffer.
 void setSession(SessionInfo sessInfo)
          specify the owning session for this ResultSetInfo.
protected  void setViewObject(oracle.jbo.ViewObject vuObj)
          Sets the server-side ViewObject associated with this ResultSetInfo.
 
Methods inherited from class oracle.dacf.dataset.InfoObject
addChangeListener, addValidationListener, areParentsValid, clearDirty, fireValidationEvent, forceValid, getChangeListeners, getLocale, getUpdateMode, getValidationListeners, internalValidation, isActive, isDirty, isValid, processValidationEvent, removeChangeListener, removeValidationListener, setActive, setDirty, setLocale, setUpdateable, setValid, toString, validate, validate, validate
 
Methods inherited from class oracle.dacf.dataset.ProducerObject
addChild, addClonedDataItem, close, findDataItem, findProducerObject, findProducerObject, getClonedDataItems, getDataItemImpl, getDataProducer, getDataSourceName, getFullName, isAClonedDataItem, isOpen, publishDataItem, publishDataItem, removeChild, removeClonedDataItem, revokeDataItem, setClonedDataItems, setDataItem, setDataSourceName, setName, setOpen
 
Methods inherited from class oracle.dacf.dataset.DacObject
addChild, findDescendant, genCloneName, getChild, getChildren, getName, getNumOfChildren, getParent, getPrefix, insertChildAt, removeChild, removeChildren, setChildren, setParent, setPrefix
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CURROW_ATTR_NAME

public static final java.lang.String CURROW_ATTR_NAME
See Also:
Constant Field Values

ROWCNT_ATTR_NAME

public static final java.lang.String ROWCNT_ATTR_NAME
See Also:
Constant Field Values

HIGH_ATTR_NAME

public static final java.lang.String HIGH_ATTR_NAME
See Also:
Constant Field Values

MODIFIED_ATTR_NAME

public static final java.lang.String MODIFIED_ATTR_NAME
See Also:
Constant Field Values

CURMSG_ATTR_NAME

public static final java.lang.String CURMSG_ATTR_NAME
See Also:
Constant Field Values

QUERYCRITERIA_ATTR_NAME

public static final java.lang.String QUERYCRITERIA_ATTR_NAME
See Also:
Constant Field Values

DEFAULT_QUERYCRITERIA_ATTR_NAME

public static final java.lang.String DEFAULT_QUERYCRITERIA_ATTR_NAME
See Also:
Constant Field Values

_SPECIAL_ATTR_CNT

protected static final int _SPECIAL_ATTR_CNT
See Also:
Constant Field Values

ERR_PROD_CODE

protected static final java.lang.String ERR_PROD_CODE

_viewObj

protected oracle.jbo.ViewObject _viewObj

DEFAULT_BUFFER_SIZE

public static final int DEFAULT_BUFFER_SIZE
The default number of rows to be retrieved at one time.

See Also:
Constant Field Values
Constructor Detail

ResultSetInfo

public ResultSetInfo()

ResultSetInfo

public ResultSetInfo(java.lang.String queryViewName)
Method Detail

setQueryOnOpen

public void setQueryOnOpen(boolean queryOnOpen)
Determines if the underlying query is automatically executed.

If the QueryOnOpen property is TRUE then the underlying query is automatically executed when the ResultSetInfo is opened.

If the property is false, then it will be necessary for executeQuery() to be called before values are retrieved via the DataItem. The DataItem will still be published on the InfoBus but it will return null values until executeQuery() is called.

The default value for this property is TRUE to maintain backwards compatability with previous versions.

Parameters:
queryOnOpen - if true then the query is executed on open
See Also:
getQueryOnOpen()

getQueryOnOpen

public boolean getQueryOnOpen()
Returns if the underlying query is automatically executed.

If the QueryOnOpen property is TRUE then the underlying query is automatically executed when the ResultSetInfo is opened.

If the property is false, then it will be necessary for executeQuery() to be called before values are retrieved via the DataItem. The DataItem will still be published on the InfoBus but it will return null values until executeQuery() is called.

The default value for this property is TRUE to maintain backwards compatability with previous versions.

Returns:
TRUE if the underlying query is automatically executed.
See Also:
setQueryOnOpen(boolean queryOnOpen)

addAttribute

public void addAttribute(ColumnInfo col)
Add a column to the ResultSetInfo.

Parameters:
col - The column to be added.

removeAttribute

public void removeAttribute(ColumnInfo col)
remove a column from the ResultSetInfo.

Parameters:
col - The column to be removed.

getAttribute

public ColumnInfo getAttribute(java.lang.String name)
Return the ColumnInfo that corresponds to the column name.

Returns:
The named ColumnInfo. The value will be null if the column is not part of the RowSet.

getAttributeCount

public int getAttributeCount()
Return the number ColumnInfo objects within the ResultSetInfo.

Returns:
the number ColumnInfo objects within the ResultSetInfo.

getAttribute

public ColumnInfo getAttribute(int colIndex)
Return the ColumnInfo that corresponds to the column index.

Returns:
ColumnInfo. The value will be null if the column is not part of the RowSet.

setAttributeInfo

public void setAttributeInfo(ColumnInfo[] kids)
An alternative way to add child ColumnInfo objects

Parameters:
kids - list of child objects which should be added to this object

getAttributeInfo

public ColumnInfo[] getAttributeInfo()
Returns the AttributeInfo objects representing the columns returned by the query.


setRangeSize

public void setRangeSize(int nuRangeSize)
Sets the size of the fetch buffer.

Parameters:
nuRangeSize - the new requested size for fetch buffer; size must be > 0 or -1; -1 indicates retrieve all rows. The maximum value is the total number of rows.
See Also:
getRangeSize()

getRangeSize

public int getRangeSize()
Returns the desired size of the fetch buffer.

The actual size of the fetch buffer might be different. The actual size of the fetch buffer can be retrieved by querying the associated RowsetAccess DataItem.

Returns:
the current size of the fetch buffer; -1 indicates retrieve all rows. The maximum value is the total number of rows.
See Also:
setRangeSize(int nuRangeSize), getRowsetAccess()

clone

public java.lang.Object clone()
Creates a deep copy of the ResultSetInfo, including the children. It also clones the QueryInfo/QueryViewInfo and causes JBO to create a new ViewObject using the cloned QueryInfo/QueryViewInfo.

Overrides:
clone in class InfoObject

addQueryListener

public void addQueryListener(QueryListener ql)

removeQueryListener

public void removeQueryListener(QueryListener ql)

getQueryListeners

public QueryListener[] getQueryListeners()

setQueryCriteria

public void setQueryCriteria(QueryCriteria queryCriteria)
Sets the QueryCriteria to be used when executing queries.

Parameters:
queryCriteria - the QueryCriteria to be used when executing queries.
See Also:
getQueryCriteria()

getQueryCriteria

public QueryCriteria getQueryCriteria()
Returns the QueryCriteria to be used when executing queries.

Returns:
the QueryCriteria to be used when executing queries.
See Also:
setQueryCriteria(QueryCriteria queryCriteria)

rowsAdded

public void rowsAdded(int rowIndex,
                      int count)
Specified by:
rowsAdded in interface oracle.dacf.dataset.QueryCriteriaStoreListener

rowsDeleted

public void rowsDeleted(int rowIndex,
                        int count)
Specified by:
rowsDeleted in interface oracle.dacf.dataset.QueryCriteriaStoreListener

rowsChanged

public void rowsChanged(int rowIndex,
                        int count)
Specified by:
rowsChanged in interface oracle.dacf.dataset.QueryCriteriaStoreListener

navigated

public void navigated(int oldCurrent,
                      int newCurrent)
Specified by:
navigated in interface oracle.dacf.dataset.QueryCriteriaStoreListener

attributeChanged

public void attributeChanged(java.lang.String name,
                             int rowIndex,
                             java.lang.Object oldValue)
Specified by:
attributeChanged in interface oracle.dacf.dataset.QueryCriteriaStoreListener

setQueryCondition

public void setQueryCondition(java.lang.String cond)
Specify the Where clause of the query statement for the ViewObject.

Bind variable can be specified using '?' at the location of the value.

Parameters:
cond - The query statement without WHERE

getQueryCondition

public java.lang.String getQueryCondition()
Retrieve the current WHERE clause of the query statement for the ViewObject.

Returns:
The query statement without WHERE

setQueryOrderbyClause

public void setQueryOrderbyClause(java.lang.String orderBy)
Specify the ORDER BY clause of the query statement for the ViewObject.

Parameters:
orderBy - The sort order clause without ORDER BY

getQueryOrderbyClause

public java.lang.String getQueryOrderbyClause()
Retrieve the current ORDER BY clause of the query statement for the ViewObject.

Returns:
The sort order clause without ORDER BY

getQueryConditionParams

public java.lang.Object[] getQueryConditionParams()
retrieve the bind variable values to use with the condition.

Returns:
Array of values to use in the order they are specified in the condition.

setQueryConditionParams

public void setQueryConditionParams(java.lang.Object[] params)
Specify the bind variable values to use with the condition.

Parameters:
params - Array of values to use in the order they are specified in the condition.

executeQuery

public void executeQuery()
Execute or re-execute the underlying query.

This method will throw a DataSourceOperationException runtime exception if there are pending changes. It it recommended that RowSetInfo.isDirty() be checked before calling this method.

Throws:
DataSourceOperationException - A Runtime exception thrown when the requested operation fails.

setQueryInfo

public void setQueryInfo(Query info)
Set the QueryInfo object for the ResultSetInfo. The QueryInfo object defines the query that will be used to retrieve data from the server.

Parameters:
info - The QueryInfo object that defines the query.

getQueryInfo

public Query getQueryInfo()
Returns the QueryInfo object for the ResultSetInfo. The QueryInfo object defines the query that will be used to retrieve data from the server.

Returns:
The QueryInfo object that defines the query.

isUpdateable

public boolean isUpdateable()
Returns the updateable property value.

Overrides:
isUpdateable in class InfoObject
Returns:
true if the InfoObject is updatable
See Also:
#setUpdatable(boolean), #getUpdatable()

setSession

public void setSession(SessionInfo sessInfo)
specify the owning session for this ResultSetInfo.

Parameters:
sessInfo - sess info to which this rowset has to be added

getSession

public SessionInfo getSession()
return the session associated with this ResultSetInfo

Returns:
SessionInfo associated with this object

open

public void open(boolean openChildren)
Sets up the ResultSetInfo for use by: It throws an IllegalStateException exception if required properties aren't set.

Overrides:
open in class ProducerObject
Parameters:
openChildren - true: open all of the child objects.
Throws:
java.lang.IllegalStateException - Thrown if open called when required properties are missing.

createChild

protected ProducerObject createChild(java.lang.String childName)
Creates a child ColumnInfo, StatusInfo or QueryCriteriaProperty.

Overrides:
createChild in class InfoObject
Parameters:
childName - The name for the new child InfoObject
Returns:
the child InfoObject.

openProducerObject

protected void openProducerObject()
Sets up the ResultSetInfo for use by: It throws an IllegalStateException exception if required properties aren't set.

Specified by:
openProducerObject in class ProducerObject
Throws:
java.lang.IllegalStateException - Thrown if open called when required properties are missing.

openChildren

protected void openChildren()
Causes all child objects to be opened.

Specified by:
openChildren in class ProducerObject

openDataItems

protected void openDataItems()
Setups up the DataItems that will be published.

Specified by:
openDataItems in class ProducerObject

findViewLinks

protected void findViewLinks()
Discovers all ViewAccessor attributes defined in the ViewObject.

If will create a ViewAccessInfo object for each ViewAccessor attribute it discovers in the ViewObject and parents those ViewAccessInfos to this ResultSetInfo.


createAssociation

protected void createAssociation()
A hook for derived class to create an association


destroyAssociation

protected void destroyAssociation()
A hook for derived class to remove an association


closeCheck

protected void closeCheck()
Checks to see if close is permitted.

Internal to the framework; should never be called by client classes

Specified by:
closeCheck in class ProducerObject
Throws:
DataSourceOperationException - Occurs when closing isn't allowed.

closeProducerObject

protected void closeProducerObject()
Close down the ResultSetInfo.

Specified by:
closeProducerObject in class ProducerObject

closeChildren

protected void closeChildren()
Description copied from class: ProducerObject
A subclass specific method for disconnecting the child objects from their server objects counterparts. Internal to the framework; should never be called by client classes

Specified by:
closeChildren in class ProducerObject

closeDataItems

protected void closeDataItems()
Description copied from class: ProducerObject
A subclass specific method for disconnecting and revoking Dataitems Internal to the framework; should never be called by client classes

Specified by:
closeDataItems in class ProducerObject

getViewObject

protected oracle.jbo.ViewObject getViewObject()
Returns the server-side ViewObject associated with this ResultSetInfo.


setViewObject

protected void setViewObject(oracle.jbo.ViewObject vuObj)
Sets the server-side ViewObject associated with this ResultSetInfo.

Parameters:
vuObj - the server-side ViewObject for this ResultSetInfo

getRowsetAccess

public javax.infobus.ScrollableRowsetAccess getRowsetAccess()
Returns ScrollableRowsetAccess interface published.

Returns:
ScrollableRowsetAccess

mapRowsetAccess

public void mapRowsetAccess(javax.infobus.ScrollableRowsetAccess target)
Maps the ScrollableRowsetAccess interface.

Maps the ScrollableRowsetAccess InfoBus interface on to another ScrollableRowsetAccess so that actions performed against the DataItem of this ResultSetInfo are reflected in the other DataItem. There will be a complete mapping if the data published by target is a superset. Otherwise the mapping will be partial; i.e. some operations won't map to target.


getDataItem

protected javax.infobus.DataItem getDataItem()
Returns that DataItem for this RowSet. The DataItem is implemented by RowsetAccessImpl and exposes the RowsetAccess, ScrollableRowsetAccess and RowsetValidate InfoBus interfaces.

Overrides:
getDataItem in class ProducerObject
Returns:
DataItem
See Also:
RowsetAccessImpl

openRowSet

protected void openRowSet()
Convienence function for calling open().

See Also:
open(boolean), ProducerObject.open(boolean)

createDynamicAttribute

protected oracle.jbo.AttributeDef createDynamicAttribute(java.lang.String name)
Creates a dynamic attribute in the BC4J ViewObject.


getChildIndex

protected int getChildIndex(java.lang.String childName)
Returns the index of this DacObject's specified child.

Overrides:
getChildIndex in class DacObject
Returns:
the 0-based index of the given child.
Throws:
java.lang.IllegalArgumentException - if the specified child cannot be found.

isSpecialItemName

protected boolean isSpecialItemName(java.lang.String name)

createDynamicAttributeInternal

protected oracle.jbo.AttributeDef createDynamicAttributeInternal(java.lang.String name)

Oracle Data-aware Controls Reference

 

Copyright © 1997, 2003, Oracle. All rights reserved.