Oracle Data-aware Controls Reference

oracle.dacf.dataset
Class QueryCriteriaRowset

java.lang.Object
  extended byoracle.dacf.dataset.DacObject
      extended byoracle.dacf.dataset.DataItemImpl
          extended byoracle.dacf.dataset.QueryCriteriaRowset
All Implemented Interfaces:
java.lang.Cloneable, javax.infobus.DataItem, javax.infobus.DataItemChangeManager, DataItemValidate, javax.infobus.DataItemView, oracle.dacf.dataset.QueryCriteriaStoreListener, javax.infobus.RowsetAccess, javax.infobus.ScrollableRowsetAccess, UnmangledQueryCriteriaStore, ViewCriteriaRowProps

public class QueryCriteriaRowset
extends DataItemImpl
implements javax.infobus.RowsetAccess, javax.infobus.ScrollableRowsetAccess, javax.infobus.DataItemView, oracle.dacf.dataset.QueryCriteriaStoreListener, ViewCriteriaRowProps, UnmangledQueryCriteriaStore

The DataItem that exposed the criteria to be utilized when executing the query against the database.

Version:
INTERNAL; since JDeveloper 3.1

Field Summary
 
Fields inherited from class oracle.dacf.dataset.DacObject
EMPTY_PREFIX, INITIAL_CAPACITY, ITEMNAME_DELIMITER
 
Constructor Summary
QueryCriteriaRowset()
           
QueryCriteriaRowset(java.lang.String name, javax.infobus.InfoBusEventListener source, QueryCriteria qc)
           
QueryCriteriaRowset(java.lang.String name, javax.infobus.InfoBusEventListener source, QueryCriteria qc, DacObject parent)
           
 
Method Summary
protected  java.lang.Object[] _getColumnLabels()
          get all the column labels
 boolean absolute(int rowNumber)
           
 void attributeChanged(java.lang.String name, int rowIndex, java.lang.Object oldValue)
           
 boolean canDelete()
           
 boolean canInsert()
           
 boolean canUpdate()
           
 boolean canUpdate(int columnIndex)
           
 boolean canUpdate(java.lang.String columnName)
           
 java.lang.Object clone()
          Copies the data item.
 void deleteRow()
           
 boolean first()
           
 void flush()
           
 int getBufferSize()
          Returns the size of the "fetch" buffer.
 int getColumnCount()
           
 java.lang.String getColumnDatatypeName(int columnIndex)
           
 int getColumnDatatypeNumber(int index)
           
 java.lang.Object getColumnItem(int colNum)
           
 java.lang.Object getColumnItem(java.lang.String colName)
           
 java.lang.String getColumnName(int colIndex)
          Gets the name of the column at postion n.
protected  oracle.dacf.dataset.QueryCriteriaStore getCriteriaStore()
          Returns the QueryCriteriaStore for the associated QueryCriteria.
 javax.infobus.DbAccess getDb()
           
 int getHighWaterMark()
           
 java.lang.Object getProperty(java.lang.String propertyName)
          Returns a property of the data item.
protected  oracle.dacf.dataset.QueryCriteriaView getQueryCriteriaView()
           
 int getRow()
           
 int getRowCount()
           
 java.lang.Object getUserData(int index)
          get user entered data for this column
 javax.infobus.ArrayAccess getView(int viewSize)
          Returns an ArrayAccess that provides access to the rows in range.
 int getViewStart()
           
 boolean hasMoreRows()
           
 boolean isUpperColumns()
          Returns the upper-columns flag for the current Row.
 boolean last()
           
 void lockRow()
           
 void navigated(int old, int nu)
           
 javax.infobus.ScrollableRowsetAccess newCursor()
           
 void newRow()
          Adds a new row to the QueryCriteriaRowset.
 boolean next()
           
 boolean previous()
           
 boolean relative(int numRows)
           
 void rowsAdded(int rowIndex, int count)
           
 void rowsChanged(int rowIndex, int count)
           
 void rowsDeleted(int rowIndex, int count)
           
 void scrollView(int numRows)
           
 void setBufferSize(int size)
          Specifies the size of the "fetch" buffer.
 void setColumnValue(int columnIndex, java.lang.Object obj)
           
 void setColumnValue(java.lang.String columnName, java.lang.Object obj)
           
protected  void setCriteriaStore(oracle.dacf.dataset.QueryCriteriaStore queryCriteriaStore)
          Sets the QueryCriteriaStore for the associated QueryCriteria.
protected  void setQueryCriteriaView(oracle.dacf.dataset.QueryCriteriaView queryCriteriaView)
           
 void setUpperColumns(boolean isUpper)
          Sets the upper-columns flag for the current Row.
 void setUserData(int index, java.lang.Object value)
          set user entered data for this column
 void setViewStart(int viewStart)
           
 void validateCurrentRow()
           
 void validateRowset()
           
 
Methods inherited from class oracle.dacf.dataset.DataItemImpl
addDataItemChangeListener, doPostRollback, doPreRollback, findDataItem, fireItemsAvailable, fireItemsAvailable, fireItemsRevoked, getDataItemChangeSupport, getProducerObject, getSource, isPublished, postRollback, preRollback, publish, publish, release, removeDataItemChangeListener, revoke, setProducerObject, setSource, shutdown, toString, validateItem
 
Methods inherited from class oracle.dacf.dataset.DacObject
addChild, findDescendant, genCloneName, getChild, getChildIndex, getChildren, getName, getNumOfChildren, getParent, getPrefix, insertChildAt, removeChild, removeChildren, setChildren, setName, setParent, setPrefix
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QueryCriteriaRowset

public QueryCriteriaRowset()

QueryCriteriaRowset

public QueryCriteriaRowset(java.lang.String name,
                           javax.infobus.InfoBusEventListener source,
                           QueryCriteria qc)

QueryCriteriaRowset

public QueryCriteriaRowset(java.lang.String name,
                           javax.infobus.InfoBusEventListener source,
                           QueryCriteria qc,
                           DacObject parent)
Method Detail

clone

public java.lang.Object clone()
Description copied from class: DataItemImpl
Copies the data item.

Overrides:
clone in class DataItemImpl
Returns:
A copy of the data item.

setQueryCriteriaView

protected void setQueryCriteriaView(oracle.dacf.dataset.QueryCriteriaView queryCriteriaView)

getQueryCriteriaView

protected oracle.dacf.dataset.QueryCriteriaView getQueryCriteriaView()

setCriteriaStore

protected void setCriteriaStore(oracle.dacf.dataset.QueryCriteriaStore queryCriteriaStore)
Sets the QueryCriteriaStore for the associated QueryCriteria.

The QueryCriteriaStore stores the query conditions that will be later set on the BC4J ViewCriteria

Parameters:
queryCriteriaStore - the QueryCriteriaStore to be used.
See Also:
getCriteriaStore(), #()

getCriteriaStore

protected oracle.dacf.dataset.QueryCriteriaStore getCriteriaStore()
Returns the QueryCriteriaStore for the associated QueryCriteria.

Returns:
the QueryCriteriaStore for the associated QueryCriteria
See Also:
setCriteriaStore(QueryCriteriaStore queryCriteriaStore)

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 old,
                      int nu)
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

getColumnCount

public final int getColumnCount()
Specified by:
getColumnCount in interface javax.infobus.RowsetAccess

getColumnName

public final java.lang.String getColumnName(int colIndex)
                                     throws java.lang.IndexOutOfBoundsException
Gets the name of the column at postion n.

Specified by:
getColumnName in interface javax.infobus.RowsetAccess
Parameters:
colIndex - the base 1 offset of the column; the first column is at colIndex value 1.
Throws:
java.lang.IndexOutOfBoundsException

getColumnDatatypeNumber

public final int getColumnDatatypeNumber(int index)
                                  throws java.lang.IndexOutOfBoundsException
Specified by:
getColumnDatatypeNumber in interface javax.infobus.RowsetAccess
Throws:
java.lang.IndexOutOfBoundsException

getColumnDatatypeName

public final java.lang.String getColumnDatatypeName(int columnIndex)
                                             throws java.lang.IndexOutOfBoundsException
Specified by:
getColumnDatatypeName in interface javax.infobus.RowsetAccess
Throws:
java.lang.IndexOutOfBoundsException

next

public boolean next()
             throws java.sql.SQLException,
                    javax.infobus.RowsetValidationException
Specified by:
next in interface javax.infobus.RowsetAccess
Throws:
java.sql.SQLException
javax.infobus.RowsetValidationException

getHighWaterMark

public final int getHighWaterMark()
Specified by:
getHighWaterMark in interface javax.infobus.RowsetAccess

hasMoreRows

public final boolean hasMoreRows()
Specified by:
hasMoreRows in interface javax.infobus.RowsetAccess

getColumnItem

public final java.lang.Object getColumnItem(int colNum)
                                     throws java.lang.IndexOutOfBoundsException
Specified by:
getColumnItem in interface javax.infobus.RowsetAccess
Throws:
java.lang.IndexOutOfBoundsException

getColumnItem

public java.lang.Object getColumnItem(java.lang.String colName)
                               throws javax.infobus.ColumnNotFoundException,
                                      javax.infobus.DuplicateColumnException
Specified by:
getColumnItem in interface javax.infobus.RowsetAccess
Throws:
javax.infobus.ColumnNotFoundException
javax.infobus.DuplicateColumnException

newRow

public void newRow()
            throws java.sql.SQLException,
                   javax.infobus.RowsetValidationException
Adds a new row to the QueryCriteriaRowset.

Specified by:
newRow in interface javax.infobus.RowsetAccess
Throws:
java.sql.SQLException - if the row creation or insert fails
javax.infobus.RowsetValidationException - if the QueryCriteriaRowset can't be updated

setColumnValue

public final void setColumnValue(int columnIndex,
                                 java.lang.Object obj)
                          throws java.lang.IndexOutOfBoundsException,
                                 javax.infobus.RowsetValidationException,
                                 java.sql.SQLException
Specified by:
setColumnValue in interface javax.infobus.RowsetAccess
Throws:
java.lang.IndexOutOfBoundsException
javax.infobus.RowsetValidationException
java.sql.SQLException

setColumnValue

public void setColumnValue(java.lang.String columnName,
                           java.lang.Object obj)
                    throws javax.infobus.ColumnNotFoundException,
                           javax.infobus.DuplicateColumnException,
                           javax.infobus.RowsetValidationException,
                           java.sql.SQLException
Specified by:
setColumnValue in interface javax.infobus.RowsetAccess
Throws:
javax.infobus.ColumnNotFoundException
javax.infobus.DuplicateColumnException
javax.infobus.RowsetValidationException
java.sql.SQLException

deleteRow

public void deleteRow()
               throws java.sql.SQLException,
                      javax.infobus.RowsetValidationException
Specified by:
deleteRow in interface javax.infobus.RowsetAccess
Throws:
java.sql.SQLException
javax.infobus.RowsetValidationException

flush

public void flush()
           throws java.sql.SQLException,
                  javax.infobus.RowsetValidationException
Specified by:
flush in interface javax.infobus.RowsetAccess
Throws:
java.sql.SQLException
javax.infobus.RowsetValidationException

lockRow

public void lockRow()
             throws java.sql.SQLException,
                    javax.infobus.RowsetValidationException
Specified by:
lockRow in interface javax.infobus.RowsetAccess
Throws:
java.sql.SQLException
javax.infobus.RowsetValidationException

canInsert

public final boolean canInsert()
Specified by:
canInsert in interface javax.infobus.RowsetAccess

canUpdate

public final boolean canUpdate()
Specified by:
canUpdate in interface javax.infobus.RowsetAccess

canUpdate

public boolean canUpdate(java.lang.String columnName)
                  throws javax.infobus.ColumnNotFoundException,
                         javax.infobus.DuplicateColumnException
Specified by:
canUpdate in interface javax.infobus.RowsetAccess
Throws:
javax.infobus.ColumnNotFoundException
javax.infobus.DuplicateColumnException

canUpdate

public final boolean canUpdate(int columnIndex)
                        throws java.lang.IndexOutOfBoundsException
Specified by:
canUpdate in interface javax.infobus.RowsetAccess
Throws:
java.lang.IndexOutOfBoundsException

canDelete

public final boolean canDelete()
Specified by:
canDelete in interface javax.infobus.RowsetAccess

getDb

public javax.infobus.DbAccess getDb()
Specified by:
getDb in interface javax.infobus.RowsetAccess

newCursor

public javax.infobus.ScrollableRowsetAccess newCursor()
Specified by:
newCursor in interface javax.infobus.ScrollableRowsetAccess
Returns:
A new, independent "cursor" into the rowset.

setBufferSize

public final void setBufferSize(int size)
Specifies the size of the "fetch" buffer.

The fetch buffer size is also the upper limit on size of the ArrayAccess returned by getView(). The requested value can not exceed the value set in the associated ResultSetInfo.

Specified by:
setBufferSize in interface javax.infobus.ScrollableRowsetAccess
Parameters:
size - the number of rows to be retrieved at a time. size must be > 0 or -1; -1 indicates retrieve all rows.
See Also:
#getView(), ResultSetInfo.getRangeSize(), ResultSetInfo.setRangeSize(int nuRangeSize)

getBufferSize

public final int getBufferSize()
Returns the size of the "fetch" buffer.

The fetch buffer size is also the upper limit on size of the ArrayAccess returned by getView().

Specified by:
getBufferSize in interface javax.infobus.ScrollableRowsetAccess
Returns:
the number of rows to be retrieved at a time; -1 indicates that all rows are retrieved.
See Also:
#getView()

previous

public boolean previous()
                 throws java.sql.SQLException,
                        javax.infobus.RowsetValidationException
Specified by:
previous in interface javax.infobus.ScrollableRowsetAccess
Throws:
java.sql.SQLException
javax.infobus.RowsetValidationException

first

public boolean first()
              throws java.sql.SQLException,
                     javax.infobus.RowsetValidationException
Specified by:
first in interface javax.infobus.ScrollableRowsetAccess
Throws:
java.sql.SQLException
javax.infobus.RowsetValidationException

last

public boolean last()
             throws java.sql.SQLException,
                    javax.infobus.RowsetValidationException
Specified by:
last in interface javax.infobus.ScrollableRowsetAccess
Throws:
java.sql.SQLException
javax.infobus.RowsetValidationException

relative

public boolean relative(int numRows)
                 throws java.sql.SQLException,
                        javax.infobus.RowsetValidationException
Specified by:
relative in interface javax.infobus.ScrollableRowsetAccess
Throws:
java.sql.SQLException
javax.infobus.RowsetValidationException

absolute

public boolean absolute(int rowNumber)
                 throws java.sql.SQLException,
                        javax.infobus.RowsetValidationException
Specified by:
absolute in interface javax.infobus.ScrollableRowsetAccess
Throws:
java.sql.SQLException
javax.infobus.RowsetValidationException

getRowCount

public final int getRowCount()
Specified by:
getRowCount in interface javax.infobus.ScrollableRowsetAccess

getRow

public final int getRow()
Specified by:
getRow in interface javax.infobus.ScrollableRowsetAccess

validateRowset

public void validateRowset()
                    throws javax.infobus.RowsetValidationException
Throws:
javax.infobus.RowsetValidationException

validateCurrentRow

public void validateCurrentRow()
                        throws javax.infobus.RowsetValidationException
Throws:
javax.infobus.RowsetValidationException

getView

public javax.infobus.ArrayAccess getView(int viewSize)
Returns an ArrayAccess that provides access to the rows in range.

The the upper limit on size of the ArrayAccess is the buffer size getView().

Specified by:
getView in interface javax.infobus.DataItemView
Returns:
An ArrayAccess providing access to the rows starting at viewStart
See Also:
getBufferSize(), #setBufferSize(ing size)

getViewStart

public final int getViewStart()
Specified by:
getViewStart in interface javax.infobus.DataItemView

setViewStart

public void setViewStart(int viewStart)
Specified by:
setViewStart in interface javax.infobus.DataItemView

scrollView

public void scrollView(int numRows)
Specified by:
scrollView in interface javax.infobus.DataItemView

getProperty

public java.lang.Object getProperty(java.lang.String propertyName)
Returns a property of the data item.

DataItemProperties defines the properties supported.

Specified by:
getProperty in interface javax.infobus.DataItem
Overrides:
getProperty in class DataItemImpl
Parameters:
propertyName - The name of the property.
Returns:
The value of the property.

isUpperColumns

public boolean isUpperColumns()
Returns the upper-columns flag for the current Row. If this flag is true, UPPER SQL operator will be applied to all CHAR/VARCHAR columns when the SQL WHERE clause is generated.

Specified by:
isUpperColumns in interface ViewCriteriaRowProps
Returns:
isSensitive flag indicating whether to apply UPPER to columns

setUpperColumns

public void setUpperColumns(boolean isUpper)
Sets the upper-columns flag for the current Row. If this flag is true, UPPER SQL operator will be applied to all CHAR/VARCHAR columns when the SQL WHERE clause is generated.

Specified by:
setUpperColumns in interface ViewCriteriaRowProps
Parameters:
isUpper - a new flag value for upper'ing columns.

getUserData

public java.lang.Object getUserData(int index)
get user entered data for this column

Specified by:
getUserData in interface UnmangledQueryCriteriaStore

setUserData

public void setUserData(int index,
                        java.lang.Object value)
set user entered data for this column

Specified by:
setUserData in interface UnmangledQueryCriteriaStore

_getColumnLabels

protected java.lang.Object[] _getColumnLabels()
get all the column labels

Returns:
array of column label one per column

Oracle Data-aware Controls Reference

 

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