|
Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client 11g Release 1 (11.1.1) E17503-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectoracle.adfnmc.java.util.AbstractCollection
oracle.adfnmc.java.util.AbstractList
oracle.adfnmc.java.util.Vector
oracle.jbo.ViewCriteria
public class ViewCriteria
A list of row criteria for a View Object's WHERE clause.
The lengths of the oracle.jbo.ViewCriteriaRows
in the list
must all match the number of attributes in the View Object.
The following example of a user-defined function, demoCriteria uses several methods
in the ViewCriteria and ViewCriteriaRow
classes to create and
populate criteria rows and to demonstrate "query-by-example." The printViewObject is
a helper function that executes the View Object query and prints the results to the screen.
public static void demoCriteria(ApplicationModule appMod) { // Create and populate criteria rows to support query-by-example. ViewObject empView = appMod.createViewObject("Emp", "mypackage1.EmpView"); ViewCriteria vc = empView.createViewCriteria(); ViewCriteriaRow vcRow = vc.createViewCriteriaRow(); // ViewCriteriaRow attribute name is case-sensitive. // ViewCriteriaRow attribute value requires operator and value. // Note also single-quotes around string value. vcRow.setAttribute("Job", "= 'MANAGER'"); vc.addElement(vcRow); vcRow = vc.createViewCriteriaRow(); vcRow.setAttribute("Sal", "> 2500"); vc.addElement(vcRow); empView.applyViewCriteria(vc); // Multiple rows are OR-ed in WHERE clause. System.out.println("Demo View Criteria"); // Should print employees that are MANAGER or have Sal > 2500 QueryDemo.printViewObject(empView); } public static void printViewObject(ViewObject vo) { // Execute the query, print results to the screen. vo.executeQuery(); // Print the View Object's query System.out.println("Query: " + vo.getQuery()); while (vo.hasNext()) { Row row = vo.next();\ String rowDataStr = ""; // How many attributes (columns) is the View Object using? int numAttrs = vo.getAttributeCount(); // Column numbers start with 0, not 1. for (int columnNo = 0; columnNo < numAttrs; columnNo++) { // See also Row.getAttribute(String name). Object attrData = row.getAttribute(columnNo); rowDataStr += (attrData + "\t"); } System.out.println(rowDataStr); } }
In the above code example, note that the View Object's
must be
called to apply this ViewCriteria to the View Object.
ViewObject.applyViewCriteria(oracle.jbo.ViewCriteria)
Nested Class Summary | |
---|---|
static class |
ViewCriteria.NestedViewCriteriaRow
|
Field Summary | |
---|---|
static java.lang.Class |
CLASS_INSTANCE
|
static int |
CRITERIA_MODE_CACHE
CRITERIA_MODE_... constants are used to specify View Criteria mode. |
static int |
CRITERIA_MODE_QUERY
CRITERIA_MODE_... constants are used to specify View Criteria mode. |
static java.lang.String |
FIND_MODE
|
protected ArrayList |
listeners
|
protected java.util.Hashtable |
mProperties
|
protected ViewCriteria |
mSavedState
|
protected VariableValueManager |
mVariableManager
|
static java.lang.String |
TEMP_VARIABLE
|
Fields inherited from class oracle.adfnmc.java.util.Vector |
---|
capacityIncrement, elementCount, elementData |
Fields inherited from class oracle.adfnmc.java.util.AbstractList |
---|
modCount |
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.ViewCriteriaComponent |
---|
VC_CONJ_AND, VC_CONJ_NOT, VC_CONJ_OR, VC_UPPER_COL_DEFAULT, VC_UPPER_COL_FALSE, VC_UPPER_COL_TRUE |
Constructor Summary | |
---|---|
ViewCriteria(StructureDef structureDef)
|
|
ViewCriteria(ViewCriteria parent,
java.lang.String structDefFullName)
|
|
ViewCriteria(ViewObject viewObject)
Creates an empty view criteria object. |
Method Summary | |
---|---|
void |
add(int index,
java.lang.Object element)
Adds the specified object into this Vector at the specified location. |
boolean |
add(java.lang.Object o)
Adds the specified object at the end of this Vector. |
boolean |
addAll(Collection c)
Adds the objects in the specified Collection to the end of this Vector. |
boolean |
addAll(int index,
Collection c)
Inserts the objects in the specified Collection at the specified location in this Vector. |
void |
addElement(java.lang.Object obj)
Adds the specified object at the end of this Vector. |
void |
addListener(java.lang.Object target)
Adds a RowSetListener . |
void |
addRow(ViewCriteriaRow newRow)
|
void |
clear()
Removes all elements from this Vector, leaving it empty. |
void |
copyFrom(ViewCriteria vc)
|
Row |
createAndInitRow(AttributeList nvp)
Creates a new Row object, but does not insert it into the row set. |
ViewCriteria |
createCriteria()
|
Key |
createKey(AttributeList nvp)
Given a list of name-value pairs, creates a Key object. |
ViewCriteriaRow |
createNestedCriteriaRow(java.lang.String name,
ViewCriteria criteria)
|
Row |
createRow()
Creates a new Row object, but does not insert it into the row set. |
ViewCriteriaRow |
createSimpleRow(java.lang.String name)
|
ViewCriteriaRow |
createViewCriteriaRow()
Creates a new ViewCriteriaRow for this ViewCriteria. |
ViewCriteriaUsage |
createViewCriteriaUsage()
Creates a View Criteria reference to an existing view criteria |
void |
criteriaChanged()
|
VariableValueManager |
ensureVariableManager()
Returns this object's Variable Value Manager. |
java.util.Enumeration |
enumerateRowsInRange()
Gets an Enumeration interface for the row set. |
RowIterator |
findByAltKey(java.lang.String keyName,
Key key,
int maxNumOfRows,
boolean skipWhere)
|
Row[] |
findByEntity(int eRowHandle,
int maxNumOfRows)
Finds and returns View rows that use the entity row, identified by the entity row handle, eRowHandle . |
Row[] |
findByKey(Key key,
int maxNumOfRows)
Finds and returns View rows that match the specified key. |
RowIterator |
findByViewCriteria(ViewCriteria criteria,
int maxNumOfRows,
int queryMode)
Finds and returns View rows that match the specified View Criteria. |
java.lang.Object |
findElementWithRelativeName(java.lang.String compName)
Find a view criteria element given a full path. |
ViewCriteriaItem |
findViewCriteriaItem(java.lang.String compName)
|
Row |
first()
Designates the first row of the row set as the current row. |
boolean |
get1013CompatibilityMode()
|
ArrayList |
getAllBindVariables()
|
protected void |
getAllBindVariables(Map map)
|
Row[] |
getAllRowsInRange()
Returns an array ViewCriteriaRow's in this ViewCriteria. |
int |
getAttributeIndexOf(java.lang.String name)
Finds the attribute associated with an attribute name. |
CriteriaClauses |
getClauses()
|
int |
getConjunction()
|
int |
getCriteriaMode()
Gets the current View Criteria mode. |
Row |
getCurrentRow()
Accesses the current row. |
int |
getCurrentRowIndex()
Gets the absolute index (not range index) of the current row. |
int |
getCurrentRowSlot()
Gets the slot status of the current row. |
java.lang.String |
getDisplayName(LocaleContext locale)
Deprecated. |
int |
getFetchedRowCount()
Counts the number of rows currently fetched in the row set. |
int |
getIterMode()
Gets the iteration mode. |
protected ArrayList |
getListenersList()
|
java.util.Hashtable |
getLocalAndResourceProperties()
Used by the marshaller to get all the properties and resources (on the server side only) that are defined in this view criteria. |
java.lang.String |
getLocaleName(LocaleContext locale,
java.lang.String sName)
* return the ViewCriteriaHints interface implemented by this class |
java.lang.Class |
getMessageBundleClass()
|
java.lang.String |
getName()
Returns the name of this Variable Manager Owner. |
HashMap |
getNestedViewCriteria(HashMap criteriaMap)
Internal use only. |
java.util.Hashtable |
getProperties()
Gets the table of properties. |
java.util.Hashtable |
getProperties(LocaleContext context)
|
java.lang.Object |
getProperty(java.lang.String property)
Retrieves the specified property, if it exists. |
java.lang.Object |
getProperty(java.lang.String property,
LocaleContext locale)
|
int |
getRangeIndexOf(Row row)
Get the index of the given row relative to the beginning of the range. |
int |
getRangeSize()
Gets the range size. |
int |
getRangeStart()
Gets the absolute index of the first row in the row set range. |
ResourceBundleDef |
getResourceBundleDef()
|
protected void |
getResourcesFromBundle(LocaleContext locale,
HashMap map)
Get all resources from the resource bundle. |
protected void |
getResourcesFromBundle(LocaleContext locale,
java.util.Hashtable map)
Get all resources from the resource bundle. |
java.lang.String |
getRootCriteriaRelativeName()
|
ViewCriteria |
getRootViewCriteria()
|
Row |
getRow(Key key)
Accesses a row through a unique key. |
Row |
getRowAtRangeIndex(int index)
Accesses a row through its index in the row set. |
int |
getRowCount()
Counts the total number of rows in the row set. |
int |
getRowCountInRange()
Gets the size of the row set range. |
List |
getRows()
Creates a XML representation of the ViewCriteria and appends it to the passed in XMLElement. |
StructureDef |
getStructureDef()
return StructureDef that this Criteria is based on. |
java.lang.String |
getStructureDefFullName()
|
int |
getUpperColumnsValue()
|
java.lang.String[] |
getUsedAttributeNames()
Finds all the attribute names used in this view criteria. |
AttributeDef[] |
getUsedViewAttributes()
Finds all the attribute definitions used in this view criteria. |
VariableValueManager |
getVariableManager()
Returns this object's current Variable Value Manager. |
ViewObject |
getViewObject()
Gets the View Object that owns the view criteria. |
ViewObject |
getViewObject(boolean getVoIfNested)
This methods return the View Object that owns this view criteria. |
protected VariableManager |
getVoVariableManager()
|
boolean |
hasData()
|
boolean |
hasNext()
Tests for the existence of a row after the current row. |
boolean |
hasPrevious()
Tests for the existence of a row before the current row. |
boolean |
hasVariables()
Returns a flag indicating whether this object has Variables or not. |
void |
initName(java.lang.String name)
|
void |
insertElementAt(java.lang.Object obj,
int index)
Inserts the specified object into this Vector at the specified location. |
void |
insertRow(Row row)
Adds a row to the row set, before the current row. |
void |
insertRowAtRangeIndex(int index,
Row row)
Adds a row to the row set at the given index. |
boolean |
isAppliedIfJoinSatisfied()
|
boolean |
isCriteriaForQuery()
Returns a flag indicating whether the View Criteria is to be included in database query or be used for in memory row filtering. |
boolean |
isCriteriaForRowMatch()
|
boolean |
isDirty()
|
boolean |
isItemHolder()
For internal use only Find out if this ViewCriteria is an item holder for a compound ViewCriteriaItem. |
boolean |
isRangeAtBottom()
Tests if the row set range is at the end of the result set. |
boolean |
isRangeAtTop()
Tests if the row set range is at the beginning of the result set. |
boolean |
isRowValidation()
Gets the validation flag on this iterator. |
static boolean |
isTemporaryVariable(Variable var)
Returns true if the variable passed is a temporary bind variable. |
boolean |
isTemporaryVariableBelongs(Variable var)
Returns true if the variable passed is a temporary bind variable created for this view criteria. |
boolean |
isUpperColumns()
|
boolean |
isUseAttributeFormatHint()
|
boolean |
isUseBindVarsOnly()
|
Row |
last()
Designates the last row of the row set as the current row. |
void |
loadVOBindVariables(Map bindVarMap)
|
Row |
next()
Steps forward, designating the next row as the current row. |
Row |
previous()
Steps backward, designating the previous row as the current row. |
java.lang.Object |
refreshProperty(java.lang.String hintName)
Retrieves the specified property, if it exists. |
java.lang.Object |
remove(int index)
Removes the object at the specified location from this List. |
boolean |
remove(java.lang.Object o)
Removes the first occurrence, starting at the beginning and moving towards the end, of the specified object from this Vector. |
boolean |
removeAll(Collection c)
Removes all occurrences in this Vector of each object in the specified Collection. |
void |
removeAllElements()
Removes all elements from this Vector, leaving the size zero and the capacity unchanged. |
void |
removeCurrentRow()
Removes the current Row object from the row set. |
Row |
removeCurrentRowAndRetain()
Removes the current Row object from the collection and retain it for insertion into another location. |
void |
removeCurrentRowFromCollection()
Removes the current Row object from the collection. |
boolean |
removeElement(java.lang.Object obj)
Removes the first occurrence, starting at the beginning and moving towards the end, of the specified object from this Vector. |
void |
removeElementAt(int index)
Removes the element found at index position location from
this Vector and decrements the size accordingly. |
void |
removeListener(java.lang.Object target)
Removes a RowSetListener . |
void |
removeProperty(java.lang.String hintName)
|
protected void |
removeRange(int fromIndex,
int toIndex)
Removes the objects in the specified range from the start to the, but not including, end index. |
boolean |
removeRow(ViewCriteriaRow row)
|
void |
reset()
Clears the "current row" designation and places the iterator in the slot before the first row. |
void |
resetCriteria()
restore the View Criteria to the state saved by the last call to the saveState method. |
void |
resolve(ViewCriteriaResolver resolver)
|
boolean |
retainAll(Collection c)
Removes all objects from this Vector that are not contained in the specified Collection. |
void |
saveState()
save the current state of the View Criteria which will be restored to when resetCriteria is called. |
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. |
int |
scrollToRangePage(int pageIndex)
This method is a no-op and returns zero. |
java.lang.Object |
set(int index,
java.lang.Object element)
Replaces the element at the specified location in this Vector with the specified object. |
void |
set1013CompatibilityMode(boolean mode)
With this flag set to true, SQL fragment is allowed in the value argument in calls calls to ViewCriteriaRow.setAttribute() method. |
void |
setAppliedIfJoinSatisfied(boolean bApplied)
|
void |
setClauses(CriteriaClauses clauses)
|
void |
setConjunction(int conj)
|
void |
setCriteriaForQuery(boolean b)
Deprecated. Since JDeveloper 10.1.3. Use setCriteriaMode(int) instead |
void |
setCriteriaMode(int mode)
Sets the criteria mode which controls the manner in which the View Criteria will be used. |
boolean |
setCurrentRow(Row row)
Designates a given row as the current row. |
boolean |
setCurrentRowAtRangeIndex(int index)
Designates a given index as the current row. |
void |
setDirty(boolean isDirty)
|
void |
setElementAt(java.lang.Object obj,
int index)
Replaces the element at the specified location in this Vector with the specified object. |
void |
setIterMode(int mode)
Modifies the iteration mode. |
void |
setName(java.lang.String name)
|
void |
setParent(java.lang.Object parent)
|
void |
setProperties(java.util.Hashtable properties)
|
void |
setProperty(java.lang.String hintName,
java.lang.Object hintValue)
|
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 |
setStructureDefFullName(java.lang.String defName)
|
void |
setUpperColumns(boolean b)
|
void |
setUseAttributeFormatHint(boolean flag)
Turn this flag off to get the 904 and earlier behavior where attribute formatters are not consulated for equality critiera. |
void |
setVariableManager(VariableValueManager variableManager)
|
void |
setViewCriteriaManager(ViewCriteriaManager manager)
|
void |
setViewObject(ViewObject vo)
|
java.lang.String |
toString()
Answers the string representation of this Vector. |
void |
trimNoDataRows()
This method walks through ViewCriteriaRow's in this ViewCriteria and removes those rows that have no data. |
void |
useBindVarsOnly()
|
void |
validate()
|
Methods inherited from class oracle.adfnmc.java.util.Vector |
---|
capacity, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, isEmpty, lastElement, lastIndexOf, lastIndexOf, setSize, size, subList, toArray, toArray, trimToSize |
Methods inherited from class oracle.adfnmc.java.util.AbstractList |
---|
iterator, listIterator, listIterator |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface oracle.adfnmc.java.util.List |
---|
iterator, listIterator, listIterator |
Field Detail |
---|
public static final java.lang.Class CLASS_INSTANCE
protected transient java.util.Hashtable mProperties
protected transient ViewCriteria mSavedState
protected transient VariableValueManager mVariableManager
public static int CRITERIA_MODE_QUERY
CRITERIA_MODE_...
constants are used to specify View Criteria mode.
CRITERIA_MODE_QUERY
means that the View Criteria will be used to augment the
database query's where-clause.
These constants may be OR'ed together. For example,
(CRITERIA_MODE_QUERY | CRITERIA_MODE_CACHE)
specifies that the View Criteria
will be used for the database query, as well as the RowMatch (in-memory row filtering).
public static int CRITERIA_MODE_CACHE
CRITERIA_MODE_...
constants are used to specify View Criteria mode.
CRITERIA_MODE_CACHE
means that the View Criteria will be used to produce a
RowMatch
, which is used for in-memory row filtering.
These constants may be OR'ed together. For example,
(CRITERIA_MODE_QUERY | CRITERIA_MODE_CACHE)
specifies that the View Criteria
will be used for the database query, as well as the RowMatch (in-memory row filtering).
public static final java.lang.String TEMP_VARIABLE
public static final java.lang.String FIND_MODE
protected ArrayList listeners
Constructor Detail |
---|
public ViewCriteria(ViewObject viewObject)
viewObject
- the owner of this ViewCriteria
.public ViewCriteria(StructureDef structureDef)
public ViewCriteria(ViewCriteria parent, java.lang.String structDefFullName)
Method Detail |
---|
public java.lang.String getName()
VariableManagerOwner
getName
in interface VariableManagerOwner
public void initName(java.lang.String name)
public void setName(java.lang.String name)
public void setParent(java.lang.Object parent)
public final boolean hasData()
public void setViewCriteriaManager(ViewCriteriaManager manager)
public CriteriaClauses getClauses()
public void setClauses(CriteriaClauses clauses)
public void criteriaChanged()
public boolean isDirty()
public void setDirty(boolean isDirty)
public boolean isCriteriaForQuery()
If true
, when the View Criteria is translated into a row qualification clause,
it will use the name of the database column to which the attribute is mapped. If
false
, the attribute name is used as is.
If the View Criteria is being used for in memory row filtering, it should be used in
conjunction with RowQualifier. See
for details.
oracle.jbo.server.ViewObjectImpl#setRowQualifier(oracle.jbo.server.RowQualifier)
true
)
or for in memory row filtering (false
).public boolean isCriteriaForRowMatch()
public void setCriteriaForQuery(boolean b)
If true
, when the View Criteria is translated into a row qualification clause,
it will use the name of the database column to which the attribute is mapped. If
false
, the attribute name is used as is.
If the View Criteria is being used for in memory row filtering, it should be used in
conjunction with RowQualifier. See
for details.
oracle.jbo.server.ViewObjectImpl#setRowQualifier(oracle.jbo.server.RowQualifier)
b
- the flag indicating whether the View Criteria is for database query (true
)
or for in memory row filtering (false
).public int getCriteriaMode()
See CRITERIA_MODE_...
constants for possible mode values.
The returning mode may be a combination (through bit-wise OR) multiple criteria modes.
public void setCriteriaMode(int mode)
See CRITERIA_MODE_...
constants for possible mode values.
The CRITERIA_MODE_...
constants may be OR'ed together. For example, if this
method is called with (CRITERIA_MODE_QUERY | CRITERIA_MODE_CACHE)
, the View
Criteria will be used for the database query, as well as the RowMatch (in-memory row
filtering).
mode
- the new criteria mode.public void setAppliedIfJoinSatisfied(boolean bApplied)
public boolean isAppliedIfJoinSatisfied()
public void setViewObject(ViewObject vo)
public void resolve(ViewCriteriaResolver resolver)
public ViewObject getViewObject()
ViewObject
that owns this ViewCriteria
.public ViewObject getViewObject(boolean getVoIfNested)
getVoIfNested
- true if the VO of the owning VC should be retrieved if this VC is a nested VC or an
item holder for a VC item. If false, this method returns the owning view object,
which could be null for nested VC or item holder.
public ViewCriteria getRootViewCriteria()
public java.lang.String getRootCriteriaRelativeName()
public ViewCriteriaItem findViewCriteriaItem(java.lang.String compName)
public java.lang.Object findElementWithRelativeName(java.lang.String compName)
getRootCriteriaRelativeName
to obtain the path and use it later to find the element
- Parameters:
compName
- The full path to the element relative to the root view criteria
- Returns:
- a View Criteria element, could be a nested view criteria,
view criteria row, or an item.
public boolean isItemHolder()
public StructureDef getStructureDef()
public java.lang.String getStructureDefFullName()
public void setStructureDefFullName(java.lang.String defName)
public int getAttributeIndexOf(java.lang.String name)
name
- the attribute name.
public java.lang.String[] getUsedAttributeNames()
public AttributeDef[] getUsedViewAttributes()
public ViewCriteriaRow createViewCriteriaRow()
ViewCriteriaRow
, an array for WHERE clause criteria.ViewCriteriaRow
public ViewCriteriaUsage createViewCriteriaUsage()
ViewCriteriaUsaga
instance that contains the the information needed
to resolve the view criteriaViewCriteriaUsage
public int getConjunction()
getConjunction
in interface ViewCriteriaComponent
public void setConjunction(int conj)
setConjunction
in interface ViewCriteriaComponent
public boolean isUpperColumns()
isUpperColumns
in interface ViewCriteriaComponent
public void setUpperColumns(boolean b)
setUpperColumns
in interface ViewCriteriaComponent
public int getUpperColumnsValue()
getUpperColumnsValue
in interface ViewCriteriaComponent
public void useBindVarsOnly()
public boolean isUseBindVarsOnly()
public void set1013CompatibilityMode(boolean mode)
mode
- true to allow SQL fragment in value argument of ViewCriteriaRow.setAttribute(), false
to unset.public boolean get1013CompatibilityMode()
public void loadVOBindVariables(Map bindVarMap)
public ArrayList getAllBindVariables()
protected void getAllBindVariables(Map map)
public Row next()
next
in interface RowIterator
null
if there is no next row.public Row previous()
previous
in interface RowIterator
null
if there is no previous row.public Row first()
first
in interface RowIterator
null
if the row set is empty.public Row last()
last
in interface RowIterator
null
if the row set is empty.public void reset()
A subsequent invocation of next()
will cause the first row to become the
current row.
reset
in interface RowIterator
public boolean hasNext()
hasNext
in interface RowIterator
true
if there is next row.public boolean hasPrevious()
hasPrevious
in interface RowIterator
true
if there is previous row.public int getFetchedRowCount()
getFetchedRowCount
in interface RowIterator
public int getRowCount()
getRowCount
in interface RowIterator
public Row getRowAtRangeIndex(int index)
getRowAtRangeIndex
in interface RowIterator
index
- an integer in the range 0
to getRangeSize() - 1
.
null
if the index is out of range.public Row getCurrentRow()
getCurrentRow
in interface RowIterator
public int getCurrentRowIndex()
getCurrentRowIndex
in interface RowIterator
public int getCurrentRowSlot()
getCurrentRowSlot
in interface RowIterator
SLOT_
. See SLOT_
constants in RowIterator
.public boolean setCurrentRow(Row row)
setCurrentRow
in interface RowIterator
row
- the new current row.
true
if the operation succeeded.public Row createAndInitRow(AttributeList nvp)
ViewCriteria
, this method works just like createRow()
.
createAndInitRow
in interface RowIterator
nvp
- not used.
public Row createRow()
createRow
in interface RowIterator
public void insertRow(Row row)
insertRow
in interface RowIterator
row
- the Row object to be added.public void removeCurrentRow()
removeCurrentRow
in interface RowIterator
public void removeCurrentRowFromCollection()
RowIterator
It does not cause the row to be deleted from the database table. It just removes the row from
the row collection. However, once the row is removed, it cannot be used any more. If you want
to remove the current row from collection and insert it elsewhere, call
, change currency to the
desired location, and then call RowIterator.removeCurrentRowAndRetain()
with that
row.
RowIterator.insertRow(oracle.jbo.Row)
removeCurrentRowFromCollection
in interface RowIterator
public Row removeCurrentRowAndRetain()
RowIterator
It does not cause the row to be deleted from the database table. It just removes the row from the row collection.
This method differs from
in that
after the current row is removed from the collection, it can be inserted back into the
collection at another location.
RowIterator.removeCurrentRowFromCollection()
To do so, call
, and get the returning
row. Then, change currency to the desired location, and call
RowIterator.removeCurrentRowAndRetain()
with that row.
RowIterator.insertRow(oracle.jbo.Row)
removeCurrentRowAndRetain
in interface RowIterator
public int setRangeSize(int size)
This method is a no-op for ViewCriteria. For a ViweCriteria, the range size is always -1.
setRangeSize
in interface RowIterator
size
- this parameter is not used.
-1
, which means that the range contains all rows.RowIterator.setRangeStart(int)
public int getRangeSize()
getRangeSize
in interface RowIterator
-1
, which means that the range contains all rows.public int getRangeStart()
The absolute index is 0-based, and is the row's index relative to the entire result set.
getRangeStart
in interface RowIterator
public int setRangeStart(int start)
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
start
- the absolute index of the new first row in the row set range.public int scrollRange(int amount)
scrollRange
in interface RowIterator
amount
- the number of rows to scroll. A negative value scrolls upward.
public int scrollToRangePage(int pageIndex)
public int scrollRangeTo(Row row, int index)
scrollRangeTo
in interface RowIterator
row
- the row.index
- the row's new index.
public boolean setCurrentRowAtRangeIndex(int index)
setCurrentRowAtRangeIndex
in interface RowIterator
index
- the index of the new current row.
true
if the operation succeeded.public void insertRowAtRangeIndex(int index, Row row)
index
is relative to the
range, i.e., index
of 0 would mean to insert before the first row of the range.
Allowed values for index
is 0 to range size. If index
equals
range size, the row is inserted right after the last row in the range. This method call does
not alter the current position of the iterator, nor does it affect the range position.
insertRowAtRangeIndex
in interface RowIterator
index
- the point where row
is to be added.row
- the Row object to be added.public int getRangeIndexOf(Row row)
getRangeIndexOf
in interface RowIterator
row
- a Row object. or -1
if the row is not in range.
row
(0 based).public int getRowCountInRange()
getRowCountInRange
in interface RowIterator
public boolean isRangeAtBottom()
isRangeAtBottom
in interface RowIterator
true
if the last row of the range is the last row of the result set.public boolean isRangeAtTop()
isRangeAtTop
in interface RowIterator
true
if the first row of the range is the first row of the result set.public java.util.Enumeration enumerateRowsInRange()
Enumeration
interface for the row set.
enumerateRowsInRange
in interface RowIterator
Enumeration
interface.public Row[] getAllRowsInRange()
getAllRowsInRange
in interface RowIterator
public Row getRow(Key key)
This operation is not supported by ViewCriteria. Calling this method will throw
InvalidOperException
.
getRow
in interface RowIterator
key
- a key.
InvalidOperException
- is thrown. ViewCriteria does not support this operation.public Row[] findByKey(Key key, int maxNumOfRows)
This operation is not supported by ViewCriteria. Calling this method will throw
InvalidOperException
.
findByKey
in interface RowIterator
key
- the key to match.maxNumOfRows
- the maximum size of the array to return, or -1 to return all rows.
InvalidOperException
- is thrown. ViewCriteria does not support this operation.public RowIterator findByAltKey(java.lang.String keyName, Key key, int maxNumOfRows, boolean skipWhere)
public RowIterator findByViewCriteria(ViewCriteria criteria, int maxNumOfRows, int queryMode)
RowIterator
ViewCriteria
for details on how to build and use a View Criteria.
The queryMode
parameter controls the manner in which the qualifying View rows
are searched. See the QUERY_MODE_...
constants in
for different contants that can be specified
(they can be OR'ed together).
ViewObject
If QUERY_MODE_SCAN_VIEW_ROWS
is specified, the existing View rows in the
current Row Set are scanned for matching rows.
If QUERY_MODE_SCAN_ENTITY_ROWS
is specified, the Entity cache is searched for
qualifying rows. If qualifying rows are found, they are added to the current Row Set. I.e.,
they become part of the current row collection. Internally, a finder View Object is created to
search the Entity cache and to produce View rows from the Entity cache.
If QUERY_MODE_SCAN_DATABASE_TABLES
is specified, a database query is issued to
find matching rows. The View Criteria is converted into a where-clause.
on the finder
View Object is invoked and the query executed.
ViewObject.applyViewCriteria(ViewCriteria)
Upon completion of this operation, the finder View Object is closed and removed.
findByViewCriteria
in interface RowIterator
criteria
- the View Criteria to be used to qualify View rows.maxNumOfRows
- the maximum size of the array to return, or -1 to return all rows. If a
value other than -1 is specified and if the specified number of rows is
reached, the method returns without performing any further operation.queryMode
- the mode in which qualify View rows are scanned. See above for further info.
public Key createKey(AttributeList nvp)
This operation is not supported by ViewCriteria. Calling this method will throw
InvalidOperException
.
createKey
in interface RowIterator
nvp
- the name value pair array.
InvalidOperException
- is thrown. ViewCriteria does not support this operation.public Row[] findByEntity(int eRowHandle, int maxNumOfRows)
eRowHandle
.
This operation is not supported by ViewCriteria. Calling this method will throw
InvalidOperException
.
findByEntity
in interface RowIterator
eRowHandle
- the entity row handle.maxNumOfRows
- the maximum size of the row array to return, or -1 to return all rows.
InvalidOperException
- is thrown. ViewCriteria does not support this operation.public void setRowValidation(boolean flag)
This operation is not supported by ViewCriteria. Calling this method will throw
InvalidOperException
.
setRowValidation
in interface RowIterator
flag
- whether to turn row validation off or not.
InvalidOperException
- is thrown. ViewCriteria does not support this operation.public boolean isRowValidation()
RowIterator
isRowValidation
in interface RowIterator
public int getIterMode()
As ViewCriteria always works with full range (range size -1), iteration mode is meaningless.
getIterMode
in interface RowIterator
RowIterator.ITER_MODE_LAST_PAGE_FULL
.public void setIterMode(int mode)
This method is a no-op for ViewCriteria. For a ViweCriteria, the range size is always -1, and thus iteration mode is meaningless.
setIterMode
in interface RowIterator
mode
- this parameter is not used.protected ArrayList getListenersList()
public void addListener(java.lang.Object target)
RowSetListener
.
addListener
in interface NavigatableRowIterator
target
- the listener to add.public void removeListener(java.lang.Object target)
RowSetListener
.
removeListener
in interface NavigatableRowIterator
target
- the listener to remove.public void trimNoDataRows()
public void setUseAttributeFormatHint(boolean flag)
public boolean isUseAttributeFormatHint()
public void copyFrom(ViewCriteria vc)
public ViewCriteria createCriteria()
public void saveState()
public void resetCriteria()
public List getRows()
node
- public void addRow(ViewCriteriaRow newRow)
public boolean removeRow(ViewCriteriaRow row)
public ViewCriteriaRow createSimpleRow(java.lang.String name)
public ViewCriteriaRow createNestedCriteriaRow(java.lang.String name, ViewCriteria criteria)
public void validate()
public java.lang.String toString()
Vector
toString
in class Vector
Vector.elements()
public static boolean isTemporaryVariable(Variable var)
var
- The variable to be checked
public boolean isTemporaryVariableBelongs(Variable var)
var
- The variable to be checked
public HashMap getNestedViewCriteria(HashMap criteriaMap)
public boolean hasVariables()
VariableManagerOwner
hasVariables
in interface VariableManagerOwner
hasVariables
in interface VariableManagerOwnerBase
public VariableValueManager getVariableManager()
VariableManagerOwner
null
if
Variable Value Manager has been initialized.
When a framework object is first created, its Variable Value Manager may be null. This method does not initialize (create) the Variable Value Manager.
in contrast, ensures that the Variable Value
Manager is initialized (created).
VariableManagerOwner.ensureVariableManager()
getVariableManager
in interface VariableManagerOwner
getVariableManager
in interface VariableManagerOwnerBase
null
if one
was not yet initialized.public VariableValueManager ensureVariableManager()
VariableManagerOwner
ensureVariableManager
in interface VariableManagerOwner
ensureVariableManager
in interface VariableManagerOwnerBase
public java.lang.Class getMessageBundleClass()
getMessageBundleClass
in interface VariableManagerOwner
getMessageBundleClass
in interface VariableManagerOwnerBase
public ResourceBundleDef getResourceBundleDef()
getResourceBundleDef
in interface VariableManagerOwner
public void add(int index, java.lang.Object element)
Vector
add
in interface List
add
in class Vector
index
- the index at which to insert the elementelement
- the object to insert in this VectorVector.addElement(java.lang.Object)
,
Vector.size()
public boolean add(java.lang.Object o)
Vector
add
in interface Collection
add
in interface List
add
in class Vector
o
- the object to add to the Vector
public boolean addAll(Collection c)
Vector
addAll
in interface Collection
addAll
in interface List
addAll
in class Vector
c
- the Collection of objects
public boolean addAll(int index, Collection c)
Vector
addAll
in interface List
addAll
in class Vector
index
- the location to insert the objectsc
- the Collection of objects
public void addElement(java.lang.Object obj)
Vector
addElement
in class Vector
obj
- the object to add to the Vectorpublic void clear()
Vector
clear
in interface Collection
clear
in interface List
clear
in class Vector
Vector.isEmpty()
,
Vector.size()
public void insertElementAt(java.lang.Object obj, int index)
Vector
insertElementAt
in class Vector
obj
- the object to insert in this Vectorindex
- the index at which to insert the elementVector.addElement(java.lang.Object)
,
Vector.size()
public java.lang.Object remove(int index)
AbstractList
remove
in interface List
remove
in class Vector
index
- the index of the object to remove
public boolean remove(java.lang.Object o)
Vector
remove
in interface Collection
remove
in interface List
remove
in class Vector
o
- the object to remove from this Vector
Vector.removeAllElements()
,
Vector.removeElementAt(int)
,
Vector.size()
public boolean removeAll(Collection c)
Vector
removeAll
in interface Collection
removeAll
in interface List
removeAll
in class Vector
c
- the Collection of objects to remove
public void removeAllElements()
Vector
removeAllElements
in class Vector
Vector.isEmpty()
,
Vector.size()
public boolean removeElement(java.lang.Object obj)
Vector
removeElement
in class Vector
obj
- the object to remove from this Vector
Vector.removeAllElements()
,
Vector.removeElementAt(int)
,
Vector.size()
public void removeElementAt(int index)
Vector
location
from
this Vector
and decrements the size accordingly.
removeElementAt
in class Vector
index
- the index of the element to removeVector.removeElement(java.lang.Object)
,
Vector.removeAllElements()
,
Vector.size()
protected void removeRange(int fromIndex, int toIndex)
Vector
removeRange
in class Vector
fromIndex
- the index at which to start removingtoIndex
- the index one past the end of the range to removepublic boolean retainAll(Collection c)
Vector
retainAll
in interface Collection
retainAll
in interface List
retainAll
in class Vector
c
- the Collection of objects to retain
public java.lang.Object set(int index, java.lang.Object element)
Vector
set
in interface List
set
in class Vector
index
- the index at which to put the specified objectelement
- the object to add to this Vector
Vector.size()
public void setElementAt(java.lang.Object obj, int index)
Vector
setElementAt
in class Vector
obj
- the object to add to this Vectorindex
- the index at which to put the specified objectVector.size()
public java.lang.String getLocaleName(LocaleContext locale, java.lang.String sName)
protected void getResourcesFromBundle(LocaleContext locale, HashMap map)
locale
- locale of the resources to be retrieved.map
- the retrieved resources will be added to the map.protected void getResourcesFromBundle(LocaleContext locale, java.util.Hashtable map)
locale
- locale of the resources to be retrieved.map
- the retrieved resources will be added to the map.public java.lang.Object getProperty(java.lang.String property, LocaleContext locale)
getProperty
in interface Properties
public java.lang.Object getProperty(java.lang.String property)
Properties
getProperty
in interface Properties
property
- Property name.
null
.public java.lang.Object refreshProperty(java.lang.String hintName)
Properties
getProperty
. As there is no notion of a 3-tier environment in ADF-nmc, this
never has any effect.
refreshProperty
in interface Properties
hintName
- Property name.
null
.public java.util.Hashtable getLocalAndResourceProperties()
public java.util.Hashtable getProperties()
Properties
getProperties
in interface Properties
public java.util.Hashtable getProperties(LocaleContext context)
public void setProperty(java.lang.String hintName, java.lang.Object hintValue)
public void removeProperty(java.lang.String hintName)
public void setProperties(java.util.Hashtable properties)
public void setVariableManager(VariableValueManager variableManager)
public final java.lang.String getDisplayName(LocaleContext locale)
locale
-
protected VariableManager getVoVariableManager()
|
Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client 11g Release 1 (11.1.1) E17503-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |