|
Business Components | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.jbo.common.ws.WSObject | +--oracle.jbo.common.ws.WSRowSetIteratorBase | +--oracle.jbo.common.ws.WSRowSet
Fields inherited from interface oracle.jbo.RowIterator |
ITER_MODE_LAST_PAGE_FULL, ITER_MODE_LAST_PAGE_PARTIAL, SLOT_BEFORE_FIRST,
SLOT_BEYOND_LAST, SLOT_DELETED, SLOT_VALID |
Fields inherited from interface oracle.jbo.XMLInterface |
XML_IGNORE_DEPTH_COUNT, XML_OPT_ALL_ROWS, XML_OPT_ASSOC_CONSISTENT,
XML_OPT_CHANGES_ONLY, XML_OPT_LIMIT_RANGE |
Method Summary |
Type | Method |
---|---|
void |
closeRowSet()
Closes the row set. |
void |
closeRowSetIterator()
Closes this row set iterator. |
RowSet |
createDetailRowSet(java.lang.String rsName,
java.lang.String linkDefName)
Creates a detail Row Set. |
RowSetIterator |
createRowSetIterator(java.lang.String name)
Creates an iterator for the row set. |
void |
executeQuery()
Executes the View Object's query. |
RowSetIterator |
findRowSetIterator(java.lang.String name)
Gets the named Row Set Iterator that was created at runtime for this Row Set. |
ApplicationModule |
getApplicationModule()
Gets the row set's Application Module. |
RowSet[] |
getDetailRowSets()
Gets an array of detail Row Sets for which this Iterator is the master. |
long |
getEstimatedRowCount()
Counts the number of rows in the collection defined by the View Object's query. |
java.lang.Object |
getImplObject()
|
int |
getIterMode()
Gets the current iteration mode. |
RowSetIterator[] |
getMasterRowSetIterators()
Return all controlling masters of this row set. |
WSObject |
getParent()
|
java.util.Hashtable |
getProperties()
Gets the table of properties. |
java.lang.Object |
getProperty(java.lang.String hintName)
Retrieves the specified property, if it exists. |
int |
getRangeSize()
Gets the size of the row set range. |
int |
getRangeStart()
Gets the absolute index of the first row in the row set range. |
RowSet |
getRowSet()
Gets the Row Set that this Iterator belongs to. |
RowSetIterator[] |
getRowSetIterators()
Gets all Row Set Iterators that belong to this row set. |
java.lang.Object |
getSyncLock()
Gets the locking object for this Row Set Iterator. |
ViewObject |
getViewObject()
Gets the View Object that contains this Row Set. |
java.lang.Object[] |
getWhereClauseParams()
Gets the bind variable values to be used with the View Object's where-clause. |
boolean |
isAssociationConsistent()
Tests if association-consistent mode is on. |
boolean |
isExecuted()
Returns true if the current ViewObject's query has been executed for this Row Set. |
boolean |
isFetchComplete()
Tests if the query result set has been fetched to the end. |
boolean |
isForwardOnly()
Tests if the row set is constrained to sequential access. |
boolean |
isMaxFetchSizeExceeded()
Tests if the query result has been fetched to the end and the end was reached due to hitting the maxFetchSize limit |
void |
readXML(Element elem,
int depthCount)
|
void |
readXML(Element elem,
int depthCount,
XSLStylesheet xslt)
|
java.lang.Object |
refreshProperty(java.lang.String hintName)
Retrieves the specified property, if it exists. |
boolean |
removeMasterRowSetIterator(RowSetIterator masterRS)
Removes a master row set iterator. |
int |
scrollRange(int amount)
Moves the row set range up or down a given number of rows. |
int |
scrollRangeTo(Row row,
int index)
Scrolls the range to place a given row at a given row set index. |
void |
setAssociationConsistent(boolean isAssociationConsistent)
Sets the association-consistent flag for this row set. |
void |
setForwardOnly(boolean isForwardOnly)
Constrains the row set to sequential access. |
void |
setImplObject(java.lang.Object o)
|
void |
setIterMode(int mode)
Sets the iteration mode for this Row Iterator. |
boolean |
setMasterRowSetIterator(RowSetIterator masterRS)
Sets the master iterator. |
int |
setRangeSize(int size)
Modifies the size of the row set range. |
int |
setRangeStart(int start)
Moves the row set range. |
void |
setRowValidation(boolean flag)
Sets the validation flag on this iterator. |
void |
setWhereClauseParam(int index,
java.lang.Object value)
Specifies a single bind variable value to use with the View Object's where-clause. |
void |
setWhereClauseParams(java.lang.Object[] values)
Specifies the bind variable values to use with the View Object's where-clause. |
Node |
writeXML(int depthCount,
long options)
Renders data in a canonical XML-format. |
Node |
writeXML(int depthCount,
long options,
XSLStylesheet xslt)
|
Node |
writeXML(long options,
com.sun.java.util.collections.HashMap voAttrMap)
Renders data in a canonical XML-format. |
Node |
writeXML(long options,
com.sun.java.util.collections.HashMap voAttrMap,
XSLStylesheet xslt)
|
Methods inherited from class oracle.jbo.common.ws.WSObject |
getId |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface oracle.jbo.RowSet |
getName |
Methods inherited from interface oracle.jbo.RowSetIterator |
addManagementListener, getNextRangeSet, getPreviousRangeSet,
isNameGenerated, removeManagementListener |
Methods inherited from interface oracle.jbo.NavigatableRowIterator |
addListener, removeListener |
Methods inherited from interface oracle.jbo.RowIterator |
createAndInitRow, createKey, createRow,
enumerateRowsInRange, findByEntity, findByKey, first, getAllRowsInRange, getCurrentRow,
getCurrentRowIndex, getCurrentRowSlot, getFetchedRowCount,
getRangeIndexOf, getRow, getRowAtRangeIndex,
getRowCount, getRowCountInRange, hasNext, hasPrevious,
insertRow, insertRowAtRangeIndex, isRangeAtBottom,
isRangeAtTop, last, next, previous,
removeCurrentRow, reset, setCurrentRow,
setCurrentRowAtRangeIndex |
Method Detail |
public WSObject getParent()
getParent
in class WSObject
public java.lang.Object getImplObject()
getImplObject
in class WSObject
public void setImplObject(java.lang.Object o)
setImplObject
in class WSObject
public boolean setMasterRowSetIterator(RowSetIterator masterRS)
RowSet
setMasterRowSetIterator
in interface RowSet
oracle.jbo.RowSet
masterRSI
- a master row set iterator.true
if the operation succeeded.public ViewObject getViewObject()
RowSet
getViewObject
in interface RowSet
oracle.jbo.RowSet
public void setWhereClauseParams(java.lang.Object[] values)
RowSet
Setting the where-clause bind values through this method
does not automatically execute the query. You must call
to apply the new bind
values.
RowSet.executeQuery()
setWhereClauseParams
in interface RowSet
oracle.jbo.RowSet
values
- an array of bind values. If the View Object
is using the JDBC style bindings ("?"
for bind
variable), values[n]
is bound to
the bind variable that appears in the n-th
order (0 based indexing). If the View Object
is using the Oracle style bindings (":1", ":2",
etc.
for bind variable), values[n]
is
bound to the bind variable :(n+1)
, i.e.,
values[0]
is bound to :1
,
values[1]
is bound to :2
, etc.public void setWhereClauseParam(int index, java.lang.Object value)
RowSet
Setting the where-clause bind values through this method
does not automatically execute the query. You must call
to apply the new bind
values.
RowSet.executeQuery()
setWhereClauseParam
in interface RowSet
oracle.jbo.RowSet
index
- the index identifying the bind variable. If the View Object
is using the JDBC style bindings ("?"
for bind
variable), value
is bound to
the bind variable that appears in the index-th
order (0 based indexing). If the View Object
is using the Oracle style bindings (":1", ":2",
etc.
for bind variable), value
is
bound to the bind variable :(index+1)
.
If index
is 0, value
is bound to :1
.
If index
is 1, value
is bound to :2
.value
- the bind variable value.public java.lang.Object[] getWhereClauseParams()
RowSet
getWhereClauseParams
in interface RowSet
oracle.jbo.RowSet
public void executeQuery()
RowSet
executeQuery
in interface RowSet
public boolean isExecuted()
RowSet
isExecuted
in interface RowSet
oracle.jbo.RowSet
true
if query has been executed.public RowSetIterator createRowSetIterator(java.lang.String name)
RowSet
createRowSetIterator
in interface RowSet
oracle.jbo.RowSet
name
- the name to be given to the iterator.this
.public RowSetIterator[] getRowSetIterators()
RowSet
getRowSetIterators
in interface RowSet
oracle.jbo.RowSet
public RowSetIterator findRowSetIterator(java.lang.String name)
RowSet
findRowSetIterator
in interface RowSet
oracle.jbo.RowSet
rsiName
- a Row Set Iterator name. If null
, it returns the
the Row Set.null
if the named Row Set Iterator is not
not found.public boolean removeMasterRowSetIterator(RowSetIterator masterRS)
RowSet
removeMasterRowSetIterator
in interface RowSet
oracle.jbo.RowSet
masterRS
- the iterator to be removed.true
if masterRS
was found,
false
otherwise.public RowSetIterator[] getMasterRowSetIterators()
RowSet
getMasterRowSetIterators
in interface RowSet
oracle.jbo.RowSet
public ApplicationModule getApplicationModule()
RowSet
getApplicationModule
in interface RowSet
oracle.jbo.RowSet
ApplicationModule
to which this
belongs.public long getEstimatedRowCount()
RowSet
This number may fluxuate when the View Object is syncronized with its Entity Object.
getEstimatedRowCount
in interface RowSet
oracle.jbo.RowSet
public boolean isForwardOnly()
RowSet
isForwardOnly
in interface RowSet
oracle.jbo.RowSet
true
if the row set is restricted to forward-only processing.RowSet.setForwardOnly(boolean)
public void setForwardOnly(boolean isForwardOnly)
RowSet
When set to true
,
a row preceeding the current row cannot be designated as the
new current row. This restriction allows performance to be optimized.
setForwardOnly
in interface RowSet
oracle.jbo.RowSet
forwardOnly
- true
restricts the row set to forward-only processing,
false
otherwise.public void setAssociationConsistent(boolean isAssociationConsistent)
RowSet
Association-consistent mode allows the user to see data that includes changes not yet posted to database, but at the cost of degraded performance.
When association-consistency is on the row set will reflect rows with modified foreign keys, newly created rows, and removed (deleted) rows. When association-consistency is off the user must post pending changes to database to make them visible.
This method is relevant only if this row set was one returned from a call to an entity association accessor.
setAssociationConsistent
in interface RowSet
oracle.jbo.RowSet
isConsistent
- indicates whether association-consistency
should be on or not.public boolean isAssociationConsistent()
RowSet
isAssociationConsistent
in interface RowSet
oracle.jbo.RowSet
true
if un-posted changes are visible,
false
otherwise.RowSet.setAssociationConsistent(boolean)
public void closeRowSet()
RowSet
closeRowSet
removes
this row set from the master row set iterator.closeRowSet
in interface RowSet
public boolean isFetchComplete()
RowSet
isFetchComplete
in interface RowSet
oracle.jbo.RowSet
true
if the result set has been
fetched to the end.public boolean isMaxFetchSizeExceeded()
RowSet
isMaxFetchSizeExceeded
in interface RowSet
oracle.jbo.RowSet
true
if the result set has been
fetched to the maxFetchSize limit and there
are still more rows in the database.public java.lang.Object getProperty(java.lang.String hintName)
Properties
getProperty
in interface Properties
oracle.jbo.Properties
hintName
- Property name.null
.public java.lang.Object refreshProperty(java.lang.String hintName)
Properties
getProperty
.refreshProperty
in interface Properties
oracle.jbo.Properties
hintName
- Property name.null
.public java.util.Hashtable getProperties()
Properties
getProperties
in interface Properties
oracle.jbo.Properties
public Node writeXML(int depthCount, long options)
XMLInterface
ViewObjectImpl
and
ViewRowImpl
implement this method to render
data in XML.
Use this method whenever data is required in XML format, either to present a UI (after converting XML data into some HTTP format using a stylesheet) or to pass the data as payload for messages via JMS.
The depthcount parameter represents to what level the rendering should recurse. A depthcount of zero (0) means do not traverse any View Links while rendering. One (1) means traverse the View Links on this object but no View Links thereafter, and so on.
The options parameter represents a set of bit flags that will control the writeXML behavior. The following bit flags have been defined:
EntityImpl
. writeXML
in interface XMLInterface
oracle.jbo.XMLInterface
depthCount
- represents to what level the rendering should recurse.options
- a set of bit flags that will control the writeXML
behavior.public Node writeXML(int depthCount, long options, XSLStylesheet xslt)
writeXML
in interface XMLInterface
public void readXML(Element elem, int depthCount)
readXML
in interface XMLInterface
public void readXML(Element elem, int depthCount, XSLStylesheet xslt)
readXML
in interface XMLInterface
public Node writeXML(long options, com.sun.java.util.collections.HashMap voAttrMap)
XMLInterface
ViewObjectImpl
and
ViewRowImpl
implement this method to render
data in XML.
Use this method whenever data is required in XML format, either to present a UI (after converting XML data into some HTTP format using a stylesheet) or to pass the data as payload for messages via JMS.
The options parameter represents a set of bit flags that will control the writeXML behavior. The following bit flags have been defined:
EntityImpl
. The voAttrMap parameter represents in a hashmap, the mapping between a given ViewObject's definition type and the corresponding Attributes/accessors to render. A null entry in the hashmap means, render all attributes and accessors of that viewobject type.
writeXML
in interface XMLInterface
oracle.jbo.XMLInterface
options
- a set of bit flags that will control the writeXMLvoAttrMap
- HashMap containing Definition names of ViewObjects and an
array of AttributeDef to render for a ViewObject of that definition type.public Node writeXML(long options, com.sun.java.util.collections.HashMap voAttrMap, XSLStylesheet xslt)
writeXML
in interface XMLInterface
public RowSet getRowSet()
RowSetIterator
getRowSet
in interface RowSetIterator
getRowSet
in class WSRowSetIteratorBase
oracle.jbo.RowSetIterator
public RowSet[] getDetailRowSets()
RowSetIterator
In a master-detail relationship in an Application Module, the master in reality is a Row Set Iterator. (Though we often speak of master View Object, in reality, it is the Iterator behind the View Object which is playing the role of the master). Whenever the currency of this master Iterator moves, the detail Row Sets are re-executed to show related Rows.
Calling this method returns an array of Row Sets that are related to this Iterator as detail Row Sets.
getDetailRowSets
in interface RowSetIterator
getDetailRowSets
in class WSRowSetIteratorBase
oracle.jbo.RowSetIterator
RowSet
.public RowSet createDetailRowSet(java.lang.String rsName, java.lang.String linkDefName)
RowSetIterator
RowSetIterator.getDetailRowSets()
for explanation of detail Row Sets.
This method creates a new detail Row Set for this Iterator.
createDetailRowSet
in interface RowSetIterator
createDetailRowSet
in class WSRowSetIteratorBase
oracle.jbo.RowSetIterator
rsName
- the name of the new detail Row Set.viewLinkDefName
- the name of a View Link definition.
This View Link chooses the relationship in which
this Iterator is the master and the new Row Set
is the detail. It must be a fully qualified
name (including the package name).public void closeRowSetIterator()
RowSetIterator
closeRowSetIterator
closes all detail row sets.
After that, it fires a RowSetManagementListener.iteratorClosed()
event to its RowSetManagementListener's
.
Then, it deregisters this row set iterator from the owning row set, and deregisters all its listeners.
closeRowSetIterator
in interface RowSetIterator
closeRowSetIterator
in class WSRowSetIteratorBase
public java.lang.Object getSyncLock()
RowSetIterator
ApplicationModule.getSyncLock()
for details.getSyncLock
in interface RowSetIterator
getSyncLock
in class WSRowSetIteratorBase
oracle.jbo.RowSetIterator
public int setRangeSize(int size)
RowIterator
This method takes effect when the next set of data is fetched. For an example usage of setRangeSize, see setRangeStart.
setRangeSize
in interface RowIterator
setRangeSize
in class WSRowSetIteratorBase
oracle.jbo.RowIterator
size
- the new number of rows in the row set range. Size of
0 is treated same as 1. Size < -1 is treated same as -1.RowIterator.setRangeStart(int)
public int getRangeSize()
RowIterator
getRangeSize
in interface RowIterator
getRangeSize
in class WSRowSetIteratorBase
oracle.jbo.RowIterator
public int getRangeStart()
RowIterator
The absolute index is 0-based, and is the row's index relative to the entire result set.
getRangeStart
in interface RowIterator
getRangeStart
in class WSRowSetIteratorBase
oracle.jbo.RowIterator
public int setRangeStart(int start)
RowIterator
Note that the index is 0-based. When you call setRangeStart(1), the range start will be positioned at the second table row.
Another behavior of setRangeStart (and also setRangeSize) is that it tries to position the range, so as to fill up the range as much as possible. For example, assume you have View Object vo focused on a table with four rows (A, B, C, D), and you execute the following code:
vo.setRangeStart(4); vo.setRangeSize(3); Row[] rows = vo.getAllRowsInRange();
In this case, rows contains the last 3 rows (B, C, D). When you call setRangeStart(4), it will try to position you at row 4. Since the index is 0-based, it finds that there is no row. Since the default range size is 1, it will position you to the last row (row index 3).
Then, when you call getRangeSize(3), it tries to fill up the range from the bottom. This is why you get (B, C, D).
setRangeStart
in interface RowIterator
setRangeStart
in class WSRowSetIteratorBase
oracle.jbo.RowIterator
start
- the absolute index of the new first row in the row set range.public int scrollRange(int amount)
RowIterator
scrollRange
in interface RowIterator
scrollRange
in class WSRowSetIteratorBase
oracle.jbo.RowIterator
amount
- the number of rows to scroll.
A negative value scrolls upward.public int scrollRangeTo(Row row, int index)
RowIterator
scrollRangeTo
in interface RowIterator
scrollRangeTo
in class WSRowSetIteratorBase
oracle.jbo.RowIterator
row
- the row.index
- the row's new index.public void setRowValidation(boolean flag)
RowIterator
setRowValidation
in interface RowIterator
setRowValidation
in class WSRowSetIteratorBase
oracle.jbo.RowIterator
flag
- Whether to turn row validation off or not.InvalidOperException
- is thrown if this iterator is
the default iterator of a ViewObject or a RowSet.public int getIterMode()
RowIterator
getIterMode
in interface RowIterator
getIterMode
in class WSRowSetIteratorBase
oracle.jbo.RowIterator
public void setIterMode(int mode)
RowIterator
setIterMode
in interface RowIterator
setIterMode
in class WSRowSetIteratorBase
oracle.jbo.RowIterator
mode
- should be ITER_MODE_LAST_PAGE_PARTIAL if the iteration mode is
to be "partial-last-page", ITER_MODE_LAST_PAGE_FULL if it
is to be "full-last-page".
|
Business Components | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |