Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1.4.0)

E10653-05

oracle.jbo
Class ViewCriteriaRow

java.lang.Object
  extended by oracle.jbo.ViewCriteriaRow
All Implemented Interfaces:
AttributeList, ExprValueSupplier, Row, ViewCriteriaComponent, XMLInterface
Direct Known Subclasses:
ViewCriteria.NestedViewCriteriaRow, ViewCriteriaRowImpl

public class ViewCriteriaRow
extends java.lang.Object
implements Row, ViewCriteriaComponent, ExprValueSupplier

An array containing criteria for the individual attributes of a View Object's WHERE clause.

A ViewCriteriaRow is owned by a ViewCriteria. For an example of a program that uses ViewCriteriaRow methods, see ViewCriteria.

ViewCriteriaRow is built as a Row. You get and set attributes through getAttribute() and setAttribute() method.

The attribute value of a ViewCriteriaRow represents a search criterion to be applied for the View Object's attribute. Each attribute criterion may optionally start with a comparison operator. Here are the operators recognized by ViewCriteriaRow: <, >, =, ~, !, LIKE, IS, IN, NOT, NULL, BETWEEN. If an operator is found, no interpretation of the attribute value occurs. I.e., the attribute value is used as is. This means that for a String attribute, one must put "'" around string constants.

If no operator is specified, for char attributes, the LIKE operator is assumed. For non-char attributes, = operator is assumed. The string constant for LIKE comparison may use "*". "*" is translated to "%".

If multiple attribute criteria are specified in this ViewCriteriaRow, i.e., setAttribute() was called on more than one attribute, the attribute criteria are AND'ed. For example, the following code snippet

    // 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();

    vcRow.setAttribute("Job", "= 'MANAGER'");
    vcRow.setAttribute("Deptno", "= 10");
    vc.addElement(vcRow);
 

will result in the following WHERE clause: "( JOB = 'MANAGER' ) AND ( DEPTNO = 10 )".

Using setUpperColumns(boolean), you can designate that this ViewCriteriaRow should apply UPPER to the database column before comparing it to the attribute criterion. Keep in mind though that the use of UPPER can have a performance consequences for a large data set, as the database engine may not be able to utilize indices for query optimization.

When multiple ViewCriteriaRow's are added to the ViewCriteria, you can specify whether the WHERE clause generated by this ViewCriteriaRow should AND or OR with the previous WHERE clause. You do this through the setConjunction(int) method. You use VCROW_CONJ_ constants to specify the desired conjunction. Note that VCROW_CONJ_NOT can be combined with other VCROW_CONJ_'s through bit-wise OR operator. VCROW_CONJ_NOT negates the entire clause generated from this ViewCriteriaRow. For example,

    // 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();

    vcRow.setAttribute("Job", "MANAGER");
    vc.addElement(vcRow);

    vcRow.setAttribute("Deptno", "= 10");
    vcRow.setConjunction(vcRow.VCROW_CONJ_NOT | vcRow.VCROW_CONJ_AND);
    vc.addElement(vcRow);

    empView.applyViewCriteria(vc);
    empView.executeQuery();
 
will result in a WHERE clause like the following: "( JOB LIKE 'MANAGER' ) AND ( NOT ( DEPTNO = 10 ) )."

Since:
JDeveloper 3.0

Field Summary
static java.lang.String VC_CONJUNCTION
           
static java.lang.String VC_ITEMS
           
static java.lang.String VC_NAME
           
static java.lang.String VC_NESTEDVC
           
static java.lang.String VC_PROPERTIES
           
static java.lang.String VC_VOBINDVARS
           
static int VCROW_CONJ_AND
          Deprecated. use ViewCriteriaComponent.VC_CONJ_AND instead.
static int VCROW_CONJ_NOT
          Deprecated. use ViewCriteriaComponent.VC_CONJ_NOT instead.
static int VCROW_CONJ_OR
          Deprecated. use ViewCriteriaComponent.VC_CONJ_OR instead.
 
Fields inherited from interface oracle.jbo.Row
EFFDT_DELETE_FUTURE_CHANGE_MODE, EFFDT_DELETE_MODE, EFFDT_DELETE_NEXT_CHANGE_MODE, EFFDT_DELETE_THIS_CHANGE_MODE, EFFDT_DELETE_ZAP_MODE, EFFDT_EXPERT_MODE, EFFDT_NONE_MODE, EFFDT_UPDATE_CHANGE_INSERT_MODE, EFFDT_UPDATE_CORRECTION, EFFDT_UPDATE_MODE, EFFDT_UPDATE_NEW_EARLIEST_CHANGE_MODE, EFFDT_UPDATE_OVERRIDE_MODE, REFRESH_CONTAINEES, REFRESH_FORGET_NEW_ROWS, REFRESH_REMOVE_NEW_ROWS, REFRESH_UNDO_CHANGES, REFRESH_WITH_DB_FORGET_CHANGES, REFRESH_WITH_DB_ONLY_IF_UNCHANGED, STATUS_INITIALIZED, STATUS_NEW
 
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, XML_PASSIVATION_USE
 
Fields inherited from interface oracle.jbo.ViewCriteriaComponent
VC_CONJ_AND, VC_CONJ_NOT, VC_CONJ_OR, VC_CONJ_UNION, VC_UPPER_COL_DEFAULT, VC_UPPER_COL_FALSE, VC_UPPER_COL_TRUE
 
Constructor Summary
ViewCriteriaRow(ViewCriteria viewCriteria)
          Creates a new view criteria row.
ViewCriteriaRow(ViewCriteria viewCriteria, java.lang.Object[] data)
          Creates a new view criteria row.
 
Method Summary
 void addCriteriaItem(java.lang.String attrName, ViewCriteriaItem vci)
          Add the given criteria item to the row, using the given attribute name.
 void copyFrom(ViewCriteriaRow vcr)
           
protected  ViewCriteriaItem createCriteriaItem(int index, java.lang.String name, int kind)
           
 ViewCriteriaItem ensureCriteriaItem(int index)
           
 ViewCriteriaItem ensureCriteriaItem(int index, int kind)
           
 ViewCriteriaItem ensureCriteriaItem(java.lang.String name)
           
 ViewCriteriaItem ensureCriteriaItem(java.lang.String name, int kind)
           
 boolean equals(java.lang.Object other)
           
protected  void getAllBindVariables(java.util.HashMap<java.lang.String,Variable> map)
           
 java.lang.Object getAttribute(int index)
          Gets the criterion for a given attribute.
 java.lang.Object getAttribute(java.lang.String name)
          Gets the criterion for a given attribute.
static java.lang.String getAttributeAlias(java.lang.String attrName, int index)
          Method for encoding an attribute name for use in setting the specific element in its list type attribute value.
 int getAttributeCount()
          Counts the attribute criteria in the row.
 AttributeHints getAttributeHints(int attrIndex)
          Returns the AttributeHints object for the specified attribute for the row.
 AttributeHints getAttributeHints(java.lang.String attrName)
          Returns the AttributeHints object for the specified attribute for the row.
 int getAttributeIndexOf(java.lang.String name)
          Gets the attribute index associated with a given attribute name.
static java.lang.String getAttributeNameFromAlias(java.lang.String attrName)
           
 java.lang.String[] getAttributeNames()
          Returns an array of attribute names in this list.
 SecurityHints getAttributeSecurityHints(int attrIndex)
          Returns the SecurityHints object for the specified attribute for the row.
 SecurityHints getAttributeSecurityHints(java.lang.String attrName)
          Returns the SecurityHints object for the specified attribute for the row.
 java.lang.Object[] getAttributeValues()
          Returns an array of attribute values in this list.
 ViewCriteriaItem getBindVarCriteriaItem(int index)
           
 int getConjunction()
           
static java.lang.String getConjunctionString(int conj)
           
static int getConjunctionValue(java.lang.String sconj)
           
 ViewCriteriaItem getCriteriaItem(int index)
           
 ViewCriteriaItem getCriteriaItem(java.lang.String name)
           
 ViewCriteriaItem[] getCriteriaItemArray()
           
 java.util.List getCriteriaItems()
          Returns a list of view criteria items that belong to this row.
protected  java.util.List<ViewCriteriaItem> getCriteriaItems(boolean flattenCompoundItems, boolean leafOnly)
          Returns a list of view criteria items that belong to this row.
 java.util.List getCriteriaItemsAndBindVars()
          Return a list of view criteria items that belong to this row, plus a list of "where" kind bind variables defined in the owning View Object.
 java.util.List getCriteriaItemsForSearch()
          Return a list of view criteria items that belong to this row to be displayed in a search form.
 int getEffectiveDateMode()
          Get the current effective date mode.
 java.lang.Object getExprVarVal(java.lang.String varName)
           
 int getItemsConjunction()
          For internal use only.
 int getItemsConjunction(boolean leafOnly)
           
 Key getKey()
          Returns the row's key.
protected  LocaleContext getLocale()
           
 java.lang.String getName()
           
 int getNestedVCCount()
           
 ViewCriteria getNestedViewCriteria()
           
 java.lang.String getOperator(int index)
           
 java.lang.String getOperator(java.lang.String attr)
           
 java.util.Hashtable getProperties()
          Return the properties of the ViewCriteria that owns this VC row.
 SecurityHints getSecurityHints()
          Returns the SecurityHints object for the row.
 StructureDef getStructureDef()
          Returns the structure of the row.
 int getUpperColumnsValue()
           
 ViewCriteria getViewCriteria()
           
 java.util.List getViewObjectBindVars()
          Internal - Applications do not use this method.
 boolean hasAttributeListChanged()
          API for checking whether the list of attributes for this view criteria row might have beeen changed.
 boolean hasData()
           
 boolean hasSameConjunction()
          Method to check whether all items under this row has the same conjunction.
 void initUniqueRowName()
          Assigns a name that is unique in the View Criteria that this row belongs.
static boolean isAttributeSearchable(AttributeDef def, LocaleContext locale)
           
 boolean isAttributeUpdateable(int index)
          Tests if an attribute is updateable.
 boolean isDead()
          An attempt to access a dead view row will lead to a DeadViewRowAccessException.
 boolean isUpperColumns()
          Returns the upper-columns flag for this ViewCriteriaRow.
 void lock()
          Locks the row(s) in the source database table.
 void mergeFrom(ViewCriteriaRow vcr)
           
protected  void notifyChanged()
           
 void readXML(Element elem, int depthCount)
           
 void readXML(Element elem, int depthCount, XSLStylesheet xslt)
           
 void refresh(int refreshMode)
          Refreshes the row's attributes with values from database.
 void remove()
          Removes the row from the source database.
 void removeAndRetain()
          Removes the row from the collection and then retain it for insertion into another location.
 void removeCriteriaItem(java.lang.String attrName, ViewCriteriaItem vci)
          Remove the given criteria item with the given attribute name from the row.
 void removeFromCollection()
          Removes the row from the collection.
 void resetOperator()
           
 void setAttribute(int index, java.lang.Object value)
          Sets the criterion for a given attribute.
 void setAttribute(java.lang.String name, java.lang.Object value)
          Sets the criterion for a given attribute.
 void setAttributeValues(java.util.List names, java.util.List values)
          Set attribute values for the given list of attributes names.
 void setBindVarCriteriaItem(int index, ViewCriteriaItem vci)
           
 void setConjunction(int conjunction)
           
 void setConjunctionOnItems(int conjunction)
          Convenience API for setting the conjunction of all items in this row.
 void setCriteriaItem(int index, ViewCriteriaItem crit)
           
 void setCriteriaItem(java.lang.String name, ViewCriteriaItem crit)
           
 void setEffectiveDateMode(int mode)
          Set the Effective Date mode in which the row updates need to be carried out.
 void setExprVarVal(java.lang.String varName, java.lang.Object val)
           
 void setName(java.lang.String name)
           
 void setNewRowState(byte state)
          Sets a new unposted row, created in this transaction, to either STATUS_NEW or STATUS_INITIALIZED mode.
 void setOperator(int index, java.lang.String oper)
           
 void setOperator(java.lang.String attr, java.lang.String oper)
           
 void setUpperColumns(boolean b)
          Sets the upper-columns flag for this ViewCriteriaRow.
 void setUpperColumnsValue(int val)
           
 java.lang.String toString()
           
 void validate()
          Invokes the validation methods defined for the row's Entity Object.
 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, java.util.HashMap map)
          Renders data in a canonical XML-format.
 Node writeXML(long options, java.util.HashMap map, XSLStylesheet xslt)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

VCROW_CONJ_OR

public static int VCROW_CONJ_OR
Deprecated. use ViewCriteriaComponent.VC_CONJ_OR instead.
VCROW_CONJ_... constants are used to specify the conjuction for this ViewCriteriaRow. See above for further explanation.

VCROW_CONJ_OR will add the clause generated by this ViewCriterRow with an OR conjunction.


VCROW_CONJ_AND

public static int VCROW_CONJ_AND
Deprecated. use ViewCriteriaComponent.VC_CONJ_AND instead.
VCROW_CONJ_... constants are used to specify the conjuction for this ViewCriteriaRow. See above for further explanation.

VCROW_CONJ_AND will add the clause generated by this ViewCriterRow with an AND conjunction.


VCROW_CONJ_NOT

public static int VCROW_CONJ_NOT
Deprecated. use ViewCriteriaComponent.VC_CONJ_NOT instead.
VCROW_CONJ_... constants are used to specify the conjuction for this ViewCriteriaRow. See above for further explanation.

VCROW_CONJ_NOT will negate the clause generated by this ViewCriterRow. VCROW_CONJ_NOT may be combined with other VCROW_CONJ_... constants through a bit-wise OR operator.


VC_ITEMS

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

VC_VOBINDVARS

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

VC_CONJUNCTION

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

VC_NESTEDVC

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

VC_PROPERTIES

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

VC_NAME

public static final java.lang.String VC_NAME
See Also:
Constant Field Values
Constructor Detail

ViewCriteriaRow

public ViewCriteriaRow(ViewCriteria viewCriteria)
Creates a new view criteria row.

Parameters:
viewCriteria - the ViewCriteria that is to contain the ViewCriteriaRow.

ViewCriteriaRow

public ViewCriteriaRow(ViewCriteria viewCriteria,
                       java.lang.Object[] data)
Creates a new view criteria row.

Parameters:
viewCriteria - the ViewCriteria that is to contain the ViewCriteriaRow
data - an array of attribute criteria to be initially assigned to this ViewCriteriaRow.
Method Detail

notifyChanged

protected void notifyChanged()

getNestedVCCount

public int getNestedVCCount()

getNestedViewCriteria

public ViewCriteria getNestedViewCriteria()

getProperties

public java.util.Hashtable getProperties()
Return the properties of the ViewCriteria that owns this VC row.

Returns:
Properties of the ViewCriteria that owns this row

getAllBindVariables

protected void getAllBindVariables(java.util.HashMap<java.lang.String,Variable> map)

getConjunction

public int getConjunction()
Specified by:
getConjunction in interface ViewCriteriaComponent

setConjunction

public void setConjunction(int conjunction)
Specified by:
setConjunction in interface ViewCriteriaComponent

isUpperColumns

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

The default is false.

Specified by:
isUpperColumns in interface ViewCriteriaComponent

setUpperColumns

public void setUpperColumns(boolean b)
Sets the upper-columns flag for this ViewCriteriaRow. 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 ViewCriteriaComponent
Parameters:
b - a new flag value for upper'ing columns.

getUpperColumnsValue

public int getUpperColumnsValue()
Specified by:
getUpperColumnsValue in interface ViewCriteriaComponent

setUpperColumnsValue

public void setUpperColumnsValue(int val)

getName

public java.lang.String getName()

setName

public void setName(java.lang.String name)

getOperator

public java.lang.String getOperator(int index)

getOperator

public java.lang.String getOperator(java.lang.String attr)

setOperator

public void setOperator(java.lang.String attr,
                        java.lang.String oper)

setOperator

public void setOperator(int index,
                        java.lang.String oper)

getViewCriteria

public ViewCriteria getViewCriteria()

hasSameConjunction

public boolean hasSameConjunction()
Method to check whether all items under this row has the same conjunction.

Returns:
True if all items under this row have the same conjunction. False otherwise.

getItemsConjunction

public int getItemsConjunction()
For internal use only. Method to return the conjunction of the criteria items that belong to this view criteria row, if the conjunction of all view criteria items, ignoring the first item that does not appear in the generated where clause, are the same.

Returns:
conjunction connecting all criteria items that belong to this view criteria row, if they have the same conjuction; returns -1 otherwise. If there is no view criteria items in this view criteria row -2 is returned.

getItemsConjunction

public int getItemsConjunction(boolean leafOnly)

setConjunctionOnItems

public void setConjunctionOnItems(int conjunction)
Convenience API for setting the conjunction of all items in this row.

Parameters:
conjunction - The conjunction that the items should be using.

hasAttributeListChanged

public boolean hasAttributeListChanged()
API for checking whether the list of attributes for this view criteria row might have beeen changed. The flag would be reset to false after this method is called, so the next call to this method would always return false unless the attribute list might be modifed again in the meantime.

Returns:
true if the list of attributes available in this row might have changed such as after the value of a discriminator attribute has changed.

getAttribute

public java.lang.Object getAttribute(int index)
Gets the criterion for a given attribute.

Specified by:
getAttribute in interface AttributeList
Parameters:
index - the attribute's index.
Returns:
the attribute's criterion.

getAttribute

public final java.lang.Object getAttribute(java.lang.String name)
Gets the criterion for a given attribute.

Specified by:
getAttribute in interface AttributeList
Parameters:
name - the attribute's name.
Returns:
the attribute's criterion.

setAttributeValues

public void setAttributeValues(java.util.List names,
                               java.util.List values)
Set attribute values for the given list of attributes names. This implementation may invoke setAttribute(name, value) for each name, value pair. List size for names and values list should match up. If there are more names than values, then the names with no corresponding value entry in the values list will be ignored.

Specified by:
setAttributeValues in interface Row

setAttribute

public void setAttribute(int index,
                         java.lang.Object value)
Sets the criterion for a given attribute.

Specified by:
setAttribute in interface AttributeList
Parameters:
index - the attribute's index.
value - a new criterion for the attribute.

setAttribute

public final void setAttribute(java.lang.String name,
                               java.lang.Object value)
Sets the criterion for a given attribute.

Specified by:
setAttribute in interface AttributeList
Parameters:
name - the attribute's name.
value - a new criterion for the attribute.

getAttributeCount

public int getAttributeCount()
Counts the attribute criteria in the row.

Specified by:
getAttributeCount in interface AttributeList
Returns:
the number of criteria.

getAttributeIndexOf

public int getAttributeIndexOf(java.lang.String name)
Gets the attribute index associated with a given attribute name.

Specified by:
getAttributeIndexOf in interface AttributeList
Parameters:
name - the attribute name.
Returns:
the attribute index. Attribute indices start from 0.

getAttributeNames

public java.lang.String[] getAttributeNames()
Description copied from interface: AttributeList
Returns an array of attribute names in this list.

Specified by:
getAttributeNames in interface AttributeList
Returns:
an array of attribute names.

getAttributeValues

public java.lang.Object[] getAttributeValues()
Description copied from interface: AttributeList
Returns an array of attribute values in this list.

Specified by:
getAttributeValues in interface AttributeList
Returns:
an array of attribute values.

getAttributeHints

public AttributeHints getAttributeHints(java.lang.String attrName)
Description copied from interface: Row
Returns the AttributeHints object for the specified attribute for the row.

Specified by:
getAttributeHints in interface Row
Parameters:
attrName - the name of the attribute.
Returns:
AttributeHints that describes the structure of the row.

getAttributeHints

public AttributeHints getAttributeHints(int attrIndex)
Description copied from interface: Row
Returns the AttributeHints object for the specified attribute for the row.

Specified by:
getAttributeHints in interface Row
Parameters:
attrIndex - the index of the attribute.
Returns:
AttributeHints that describes the structure of the row.

getKey

public Key getKey()
Returns the row's key. ViewCriterRow does not have a key.

Specified by:
getKey in interface Row
Returns:
null.

validate

public void validate()
Invokes the validation methods defined for the row's Entity Object.

Specified by:
validate in interface Row
Throws:
JboException - a runtime exception, if the recipient wishes the property change to be rolled back.
See Also:
EntityImpl.validate(), ViewRowImpl.validate()

lock

public void lock()
Locks the row(s) in the source database table.

Specified by:
lock in interface Row
Throws:
JboException - a runtime exception, if an exception occurs during access.

remove

public void remove()
Removes the row from the source database.

Specified by:
remove in interface Row
Throws:
JboException - a runtime exception, if an exception occurs during access.

removeFromCollection

public void removeFromCollection()
Description copied from interface: Row
Removes the row from the collection.

This method differs from Row.remove() in that it just removes the row from the collection. It does not remove the underlying Entity row(s) or database row(s). However, once the row is removed, it cannot be used any more. If you want to remove the row from the collection and insert it elsewhere, call Row.removeAndRetain().

Specified by:
removeFromCollection in interface Row

removeAndRetain

public void removeAndRetain()
Description copied from interface: Row
Removes the row from the collection and then retain it for insertion into another location.

This method differs from Row.remove() in that it just removes the row from the collection. It does not remove the underlying Entity row(s) or database row(s).

This method also differs from Row.removeFromCollection() in that after the row is removed from the collection, it can be inserted back into the collection at another location.

Specified by:
removeAndRetain in interface Row

refresh

public void refresh(int refreshMode)
Description copied from interface: Row
Refreshes the row's attributes with values from database. refreshMode should be a combination of REFRESH_.... See REFRESH_... constants for further information.

Specified by:
refresh in interface Row
Parameters:
refreshMode - the refresh mode.

isAttributeUpdateable

public boolean isAttributeUpdateable(int index)
Tests if an attribute is updateable.

Specified by:
isAttributeUpdateable in interface Row
Parameters:
index - the index of the attribute.
Returns:
true if the row is marked UPDATEABLE, or if the row is marked UPDATEABLE_WHILE_NEW and the current row is new.

getStructureDef

public StructureDef getStructureDef()
Description copied from interface: Row
Returns the structure of the row.

Specified by:
getStructureDef in interface Row
Returns:
StructureDef that describes the structure of the row.

writeXML

public Node writeXML(long options,
                     java.util.HashMap map)
Description copied from interface: XMLInterface
Renders data in a canonical XML-format. The classes 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:

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.

Specified by:
writeXML in interface XMLInterface
Parameters:
options - a set of bit flags that will control the writeXML
map - HashMap containing Definition names of ViewObjects and an array of AttributeDef to render for a ViewObject of that definition type.

writeXML

public Node writeXML(long options,
                     java.util.HashMap map,
                     XSLStylesheet xslt)
Specified by:
writeXML in interface XMLInterface

writeXML

public Node writeXML(int depthCount,
                     long options)
Description copied from interface: XMLInterface
Renders data in a canonical XML-format. The classes 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:

Specified by:
writeXML in interface XMLInterface
Parameters:
depthCount - represents to what level the rendering should recurse.
options - a set of bit flags that will control the writeXML behavior.

writeXML

public Node writeXML(int depthCount,
                     long options,
                     XSLStylesheet xslt)
Specified by:
writeXML in interface XMLInterface

readXML

public void readXML(Element elem,
                    int depthCount)
Specified by:
readXML in interface XMLInterface

readXML

public void readXML(Element elem,
                    int depthCount,
                    XSLStylesheet xslt)
Specified by:
readXML in interface XMLInterface

setEffectiveDateMode

public void setEffectiveDateMode(int mode)
Description copied from interface: Row
Set the Effective Date mode in which the row updates need to be carried out. The mode needs to be set prior to the changes.

Specified by:
setEffectiveDateMode in interface Row
Parameters:
mode - One of the effective date mode constants.
See Also:
Row.EFFDT_NONE_MODE, Row.EFFDT_UPDATE_CORRECTION, Row.EFFDT_UPDATE_MODE, Row.EFFDT_UPDATE_OVERRIDE_MODE, Row.EFFDT_UPDATE_CHANGE_INSERT_MODE, Row.EFFDT_UPDATE_NEW_EARLIEST_CHANGE_MODE, Row.EFFDT_DELETE_MODE, Row.EFFDT_DELETE_THIS_CHANGE_MODE, Row.EFFDT_DELETE_NEXT_CHANGE_MODE, Row.EFFDT_DELETE_FUTURE_CHANGE_MODE, Row.EFFDT_DELETE_ZAP_MODE

getEffectiveDateMode

public int getEffectiveDateMode()
Description copied from interface: Row
Get the current effective date mode.

Specified by:
getEffectiveDateMode in interface Row
Returns:
The current mode of an effective dated row.
See Also:
Row.setEffectiveDateMode(int)

hasData

public final boolean hasData()

setNewRowState

public void setNewRowState(byte state)
Description copied from interface: Row
Sets a new unposted row, created in this transaction, to either STATUS_NEW or STATUS_INITIALIZED mode. Calling this method on a row in any other state will be a no-op.

This method should be used to create a row and then to mark it temporary (STATUS_INITIALIZED) so that an app can use the created Row to fill UIs like Table UIs with valid default values for rows. Then when the Row values are updated, UIs should once again call this method to turn the Row into new (STATUS_NEW) state before any setAttribute calls on the Row, so that the changes are validated and posted.

When a created row is in STATUS_NEW (by default) state and this method is called to turn the row in to STATUS_INITIALIZED, all updateable entities that this row comprises of, de=registers themselves from their respective transaction and validation managers. Assocation and ViewLink finders will not find/include these rows. Only the collection into which this row was inserted into will contain a reference to this row and when that collection is re-executed this row cannot be reached via the framework. To include this row again an app should call this method again with STATUS_NEW as the method-argument

When this row is in STATUS_INITIALIZED state and this method is called with STATUS_NEW state then, this new row is added back into it's relevant transaction and validation manager and will then participate in validation, transaction cycles.

Note that incase of composition if a master/detail hierarchy is being created with the intention of making them temporary (STATUS_INITIALIZED) then the logic should be: Create Master row, insert Master row into a collection, create Detail row insert detail row into a relevant collection, make detail row initialized, create/insert/change-to-initialized more detail rows and at the end set the master row as initialized.

Specified by:
setNewRowState in interface Row
Parameters:
state - This could be STATUS_NEW or STATUS_INITIALIZED.

isDead

public boolean isDead()
Description copied from interface: Row
An attempt to access a dead view row will lead to a DeadViewRowAccessException. Using this API method, client code can test the row state.

Specified by:
isDead in interface Row
Returns:
true if the row is dead.

copyFrom

public void copyFrom(ViewCriteriaRow vcr)

mergeFrom

public void mergeFrom(ViewCriteriaRow vcr)

createCriteriaItem

protected ViewCriteriaItem createCriteriaItem(int index,
                                              java.lang.String name,
                                              int kind)

ensureCriteriaItem

public ViewCriteriaItem ensureCriteriaItem(int index,
                                           int kind)

ensureCriteriaItem

public ViewCriteriaItem ensureCriteriaItem(java.lang.String name,
                                           int kind)

ensureCriteriaItem

public ViewCriteriaItem ensureCriteriaItem(int index)

ensureCriteriaItem

public ViewCriteriaItem ensureCriteriaItem(java.lang.String name)

getCriteriaItem

public ViewCriteriaItem getCriteriaItem(int index)

getCriteriaItem

public ViewCriteriaItem getCriteriaItem(java.lang.String name)

getCriteriaItemArray

public ViewCriteriaItem[] getCriteriaItemArray()

setCriteriaItem

public void setCriteriaItem(int index,
                            ViewCriteriaItem crit)

setCriteriaItem

public void setCriteriaItem(java.lang.String name,
                            ViewCriteriaItem crit)

getBindVarCriteriaItem

public ViewCriteriaItem getBindVarCriteriaItem(int index)

setBindVarCriteriaItem

public void setBindVarCriteriaItem(int index,
                                   ViewCriteriaItem vci)

addCriteriaItem

public void addCriteriaItem(java.lang.String attrName,
                            ViewCriteriaItem vci)
Add the given criteria item to the row, using the given attribute name. If an item already exist for the attribute, create a compound vc item and add an entry in the compound item with the given vc item.

Parameters:
attrName -
vci -

removeCriteriaItem

public void removeCriteriaItem(java.lang.String attrName,
                               ViewCriteriaItem vci)
Remove the given criteria item with the given attribute name from the row.

Parameters:
attrName -
vci -

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getConjunctionValue

public static int getConjunctionValue(java.lang.String sconj)

getConjunctionString

public static java.lang.String getConjunctionString(int conj)

getExprVarVal

public java.lang.Object getExprVarVal(java.lang.String varName)
Specified by:
getExprVarVal in interface ExprValueSupplier

setExprVarVal

public void setExprVarVal(java.lang.String varName,
                          java.lang.Object val)
Specified by:
setExprVarVal in interface ExprValueSupplier

getAttributeAlias

public static java.lang.String getAttributeAlias(java.lang.String attrName,
                                                 int index)
Method for encoding an attribute name for use in setting the specific element in its list type attribute value. setAttribute will call method to decode this name and call setValue of the VC item with the desired index. For use by search binding to create LOV binding that updates the specific element in an attribute with multiple values.

Parameters:
attrName - the name of the attribute with list type value
index - the element in the value list whose value is to be set when the encoded attribute name is passed to setAttribute
Returns:
An encoded attribute name to be passed to setAttribute

getAttributeNameFromAlias

public static java.lang.String getAttributeNameFromAlias(java.lang.String attrName)

isAttributeSearchable

public static boolean isAttributeSearchable(AttributeDef def,
                                            LocaleContext locale)
For internal use only. Application developers should not use this
Used by internal framework only - do not use

resetOperator

public void resetOperator()

getCriteriaItemsAndBindVars

public java.util.List getCriteriaItemsAndBindVars()
Return a list of view criteria items that belong to this row, plus a list of "where" kind bind variables defined in the owning View Object. Each object in the return list support a list of attributes as defined in the createViewCriteriaItemAttributes method in DCDataVO.

Returns:
A list of ViewCriteriaItem and JboAbstractMap wrappers for Variables that are used by the owning View Object or referenced by a view criteria item in the owning view criteria.

getCriteriaItemsForSearch

public java.util.List getCriteriaItemsForSearch()
Return a list of view criteria items that belong to this row to be displayed in a search form. Each object in the return list support a list of attributes as defined in the createViewCriteriaItemAttributes method in DCDataVO.

Returns:
A list of ViewCriteriaItem and JboAbstractMap wrappers for Variables that are used by the owning View Object or referenced by a view criteria item in the owning view criteria.

getViewObjectBindVars

public java.util.List getViewObjectBindVars()
Internal - Applications do not use this method. Return a list "where" kind bind variables defined in the owning View Object. Each object in the return list support a list of attributes as defined in the createViewCriteriaItemAttributes method in DCDataVO.

Returns:
A list of JboAbstractMap wrappers for Variables that are used by the owning View Object

getLocale

protected LocaleContext getLocale()

initUniqueRowName

public void initUniqueRowName()
Assigns a name that is unique in the View Criteria that this row belongs.

For internal use only. Application developers should not use this
Used by internal framework only - do not use

getCriteriaItems

public java.util.List getCriteriaItems()
Returns a list of view criteria items that belong to this row.

Returns:
A list of view criteria items that belong to this row. An empty list is returned if this row contains no view criteria items.

getCriteriaItems

protected java.util.List<ViewCriteriaItem> getCriteriaItems(boolean flattenCompoundItems,
                                                            boolean leafOnly)
Returns a list of view criteria items that belong to this row.

Parameters:
flattenCompoundItems - whether compound vc items should be included in the return list as is, or if the vc items that are found inside a compound vc item should be included in the return list. If this flag is true, the method would extract the vc items from any compound vc item, so the return list may include more than one vc item for the same attribute. If this flag is false, the method would return the compound vc item and the return list would only include at most one vc item, which may be a compound item, for the same attribute.
leafOnly - true if the result should only include leaf vc items, ie, items that does not contain nested viewcriteria as values. For items that contains nested vc values, the method would include in the result the leaf vc items of the nested vc. false if vc items containing nested vc value should be included in the result.
Returns:
A list of view criteria items that belong to this row. An empty list is returned if this row contains no view criteria items.

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object

getAttributeSecurityHints

public SecurityHints getAttributeSecurityHints(java.lang.String attrName)
Description copied from interface: Row
Returns the SecurityHints object for the specified attribute for the row.

Specified by:
getAttributeSecurityHints in interface Row
Parameters:
attrName - the name of the attribute.
Returns:
SecurityHints of the row.

getAttributeSecurityHints

public SecurityHints getAttributeSecurityHints(int attrIndex)
Description copied from interface: Row
Returns the SecurityHints object for the specified attribute for the row.

Specified by:
getAttributeSecurityHints in interface Row
Parameters:
attrIndex - the index of the attribute.
Returns:
SecurityHints of the row.

getSecurityHints

public SecurityHints getSecurityHints()
Description copied from interface: Row
Returns the SecurityHints object for the row.

Specified by:
getSecurityHints in interface Row
Returns:
SecurityHints of the row.

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1.4.0)

E10653-05

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