Business Components

oracle.jbo
Class ViewCriteriaRow

java.lang.Object
  |
  +--oracle.jbo.ViewCriteriaRow
All Implemented Interfaces:
AttributeList, Row, XMLInterface

public class ViewCriteriaRow
extends java.lang.Object
implements Row

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

For an example of a program that uses ViewCriteriaRow methods, see ViewCriteria.

Since:
JDeveloper 3.0

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
 
Constructor Summary
ViewCriteriaRow(ViewCriteria viewCriteria, java.lang.Object[] data)
          Creates a new view criteria row.
 
Method Summary
TypeMethod
 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.
 int getAttributeCount()
          Counts the attribute criteria in the row.
 int getAttributeIndexOf(java.lang.String name)
          Gets the attribute index associated with a given attribute name.
 Key getKey()
          Returns the row's key.
 boolean hasData()
           
 boolean isAttributeUpdateable(int index)
          Tests if an attribute is updateable.
 boolean isUpperColumns()
          Returns the upper-columns flag for this ViewCriteriaRow.
 void lock()
          Locks the row(s) in the source database table.
 void readXML(Element elem, int depthCount)
           
 void readXML(Element elem, int depthCount, XSLStylesheet xslt)
           
 void remove()
          Removes the row from the source database.
 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 setUpperColumns(boolean isUpper)
          Sets the upper-columns flag for this ViewCriteriaRow.
 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, com.sun.java.util.collections.HashMap map)
          Renders data in a canonical XML-format.
 Node writeXML(long options, com.sun.java.util.collections.HashMap map, XSLStylesheet xslt)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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

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.

Parameters:
isSensitive - flag indicating whether to apply UPPER to columns

setUpperColumns

public void setUpperColumns(boolean isUpper)
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.
Parameters:
isUpper - a new flag value for upper'ing columns.

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.

setAttribute

public void setAttribute(int index,
                         java.lang.Object value)
Sets the criterion for a given attribute.
Specified by:
setAttribute in interface AttributeList
Parameters:
name - 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.

getKey

public Key getKey()
Returns the row's key.
Specified by:
getKey in interface Row
Returns:
the row's Key.

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.

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.

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.

writeXML

public Node writeXML(long options,
                     com.sun.java.util.collections.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
Following copied from interface: oracle.jbo.XMLInterface
Parameters:
options - a set of bit flags that will control the writeXML
voAttrMap - 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,
                     com.sun.java.util.collections.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
Following copied from interface: oracle.jbo.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

hasData

public final boolean hasData()

Business Components