public class

DataCriteria

extends DataObject
java.lang.Object
   ↳ org.mule.modules.oracle.model.AbstractDataObject
     ↳ com.oracle.xmlns.svc.DataObject
       ↳ com.oracle.xmlns.svc.DataCriteria

Class Overview

Represents a criteria that the returned data must satisfy when getting/requesting data from a DataSourceService DataSourceService.

DataCriteria can be used to set criteria for parent as well as children data objects. It can also be used to specify criteria for specific instances of these data objects.

Example #1: Retrieve the first five purchase orders with PONumber between 1 and 10, and description like 'printed%', along with the first five purchase order lines with description like 'power%' for each purchase order

 DataObjectFactory fac = ...
 DataCriteria dc = (DataCriteria)fac.createDataObject(DataCriteria.QUALIFIED_NAME);
 dc.setFetchIndex(0);
 dc.setFetchSize(5);
 PurchaseOrderFilter filter = 
    (PurchaseOrderFilter)fac.createDataObject(PurchaseOrderFilter.QUALIFIED_NAME);
 filter.setConjunctionOperator(ExpressionFilter.OPERATOR_AND);
 ArrayList values = new ArrayList();
 values.add(new Number(1));
 values.add(new Number(10));
 filter.addPoNumber(ValueExpression.BETWEEN, values);
 filter.addDescription(ValueExpression.LIKE_IGNORE_CASE, "printed%");
 dc.setFilter(filter);
 //Lines Data Criteria
 DataCriteria lineRC = (DataCriteria)fac.createDataObject(DataCriteria.QUALIFIED_NAME);
 dc.setFetchIndex(0);
 dc.setFetchSize(5);
 LineFilter lineFilter = 
    (LineFilter)fac.createDataObject(LineFilter.QUALIFIED_NAME);
 lineFilter.setItemDescription(ValueExpression.LIKE, "%power%");
 lineRC.setFilter(lineFilter);
 dc.ChildDataCriteria("Lines", lineRC);
 List list = svc.getDataList("PurchaseOrders", dc, null);
 

Example #2: Fetch next 5 purchase orders

 DataObjectFactory fac = ...
 DataCriteria dc = (DataCriteria)fac.createDataObject(DataCriteria.QUALIFIED_NAME);
 dc.setFetchIndex(5);
 dc.setFetchSize(5);
 QueryControll qc = (QueryControll)fac.createDataObject(QueryControll.QUALIFIED_NAME);
 qc.setFetchOnly(Boolean.TRUE);
 java.util.List list = svc.getDataList("PurchaseOrders", dc, qc);
 

Example #3: Query purchase orders and return only the "Description" attribute for PoNumber 5, and "Status" for PoNumber 10.

 DataObjectFactory fac = ...
 DataCriteria dc = (DataCriteria)fac.createDataObject(DataCriteria.QUALIFIED_NAME);
 dc.setFetchIndex(0);
 dc.setFetchSize(100);
  
 InstanceCriteria ins1 = dc.addInstanceCriteria();
 PurchaseOrder po1 = (PurchaseOrder)fac.createDataObject(PurchaseOrder.QUALIFIED_NAME);
 po1.setPoNumber(5);
 ins1.setDataObjectInstanceAttributes(po1);
 List partialList1 = new ArrayList(1);
 partialList1.add("Description");
 ins1.setPartialAttribute(partialList1);
 InstanceCriteria ins2 = dc.addInstanceCriteria();
 PurchaseOrder po2 = (PurchaseOrder)fac.createDataObject(PurchaseOrder.QUALIFIED_NAME);
 po1.setPoNumber(10);
 ins2.setDataObjectInstanceAttributes(po2);
 List partialList1 = new ArrayList(2);
 partialList2.add("Status");
 ins2.setPartialAttribute(partialList2);
 List list = svc.getDataList("PurchaseOrders", dc, null);
 

Java class for DataCriteria complex type.

The following schema fragment specifies the expected content contained within this class.

 <complexType name="DataCriteria">
   <complexContent>
     <extension base="{http://xmlns.oracle.com/svc}DataObject">
       <sequence>
         <element name="FetchIndex" type="{http://www.w3.org/2001/XMLSchema}decimal" minOccurs="0"/>
         <element name="FetchSize" type="{http://www.w3.org/2001/XMLSchema}decimal" minOccurs="0"/>
         <element name="LastFetchFull" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
         <element name="Filter" type="{http://xmlns.oracle.com/svc}DataObject" minOccurs="0"/>
         <element name="SortOrder" type="{http://xmlns.oracle.com/svc}SortAttribute" maxOccurs="unbounded" minOccurs="0"/>
         <element name="PartialAttributeMode" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
         <element name="PartialAttribute" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
         <element name="ChildDataCriteria" type="{http://xmlns.oracle.com/svc}ChildDataCriteria" maxOccurs="unbounded" minOccurs="0"/>
         <element name="InstanceCriteria" type="{http://xmlns.oracle.com/svc}InstanceCriteria" maxOccurs="unbounded" minOccurs="0"/>
       </sequence>
     </extension>
   </complexContent>
 </complexType>
 

Summary

Fields
protected List<ChildDataCriteria> childDataCriteria
protected BigDecimal fetchIndex
protected BigDecimal fetchSize
protected DataObject filter
protected List<InstanceCriteria> instanceCriteria
protected Boolean lastFetchFull
protected List<String> partialAttribute
protected String partialAttributeMode
protected List<SortAttribute> sortOrder
Public Constructors
DataCriteria()
Public Methods
List<ChildDataCriteria> getChildDataCriteria()
Gets the value of the childDataCriteria property.
BigDecimal getFetchIndex()
Gets the value of the fetchIndex property.
BigDecimal getFetchSize()
Gets the value of the fetchSize property.
DataObject getFilter()
Gets the value of the filter property.
List<InstanceCriteria> getInstanceCriteria()
Gets the value of the instanceCriteria property.
Boolean getLastFetchFull()
Gets the value of the lastFetchFull property.
List<String> getPartialAttribute()
Gets the value of the partialAttribute property.
String getPartialAttributeMode()
Gets the value of the partialAttributeMode property.
List<SortAttribute> getSortOrder()
Gets the value of the sortOrder property.
void setChildDataCriteria(List<ChildDataCriteria> childDataCriteria)
Sets the value of the childDataCriteria property.
void setFetchIndex(BigDecimal value)
Sets the value of the fetchIndex property.
void setFetchSize(BigDecimal value)
Sets the value of the fetchSize property.
void setFilter(DataObject value)
Sets the value of the filter property.
void setInstanceCriteria(List<InstanceCriteria> instanceCriteria)
Sets the value of the instanceCriteria property.
void setLastFetchFull(Boolean value)
Sets the value of the lastFetchFull property.
void setPartialAttribute(List<String> partialAttribute)
Sets the value of the partialAttribute property.
void setPartialAttributeMode(String value)
Sets the value of the partialAttributeMode property.
void setSortOrder(List<SortAttribute> sortOrder)
Sets the value of the sortOrder property.
[Expand]
Inherited Methods
From class org.mule.modules.oracle.model.AbstractDataObject
From class java.lang.Object

Fields

protected List<ChildDataCriteria> childDataCriteria

protected BigDecimal fetchIndex

protected BigDecimal fetchSize

protected DataObject filter

protected List<InstanceCriteria> instanceCriteria

protected Boolean lastFetchFull

protected List<String> partialAttribute

protected String partialAttributeMode

protected List<SortAttribute> sortOrder

Public Constructors

public DataCriteria ()

Public Methods

public List<ChildDataCriteria> getChildDataCriteria ()

Gets the value of the childDataCriteria property.

This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a set method for the childDataCriteria property.

For example, to add a new item, do as follows:

    getChildDataCriteria().add(newItem);
 

Objects of the following type(s) are allowed in the list ChildDataCriteria

public BigDecimal getFetchIndex ()

Gets the value of the fetchIndex property.

Returns
  • possible object is BigDecimal

public BigDecimal getFetchSize ()

Gets the value of the fetchSize property.

Returns
  • possible object is BigDecimal

public DataObject getFilter ()

Gets the value of the filter property.

Returns

public List<InstanceCriteria> getInstanceCriteria ()

Gets the value of the instanceCriteria property.

This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a set method for the instanceCriteria property.

For example, to add a new item, do as follows:

    getInstanceCriteria().add(newItem);
 

Objects of the following type(s) are allowed in the list InstanceCriteria

public Boolean getLastFetchFull ()

Gets the value of the lastFetchFull property. This getter has been renamed from isLastFetchFull() to getLastFetchFull() by cxf-xjc-boolean plugin.

Returns
  • possible object is Boolean

public List<String> getPartialAttribute ()

Gets the value of the partialAttribute property.

This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a set method for the partialAttribute property.

For example, to add a new item, do as follows:

    getPartialAttribute().add(newItem);
 

Objects of the following type(s) are allowed in the list String

public String getPartialAttributeMode ()

Gets the value of the partialAttributeMode property.

Returns
  • possible object is String

public List<SortAttribute> getSortOrder ()

Gets the value of the sortOrder property.

This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a set method for the sortOrder property.

For example, to add a new item, do as follows:

    getSortOrder().add(newItem);
 

Objects of the following type(s) are allowed in the list SortAttribute

public void setChildDataCriteria (List<ChildDataCriteria> childDataCriteria)

Sets the value of the childDataCriteria property.

Parameters
childDataCriteria Allowed object is ChildDataCriteria

public void setFetchIndex (BigDecimal value)

Sets the value of the fetchIndex property.

Parameters
value Allowed object is BigDecimal

public void setFetchSize (BigDecimal value)

Sets the value of the fetchSize property.

Parameters
value Allowed object is BigDecimal

public void setFilter (DataObject value)

Sets the value of the filter property.

Parameters
value Allowed object is DataObject

public void setInstanceCriteria (List<InstanceCriteria> instanceCriteria)

Sets the value of the instanceCriteria property.

Parameters
instanceCriteria Allowed object is InstanceCriteria

public void setLastFetchFull (Boolean value)

Sets the value of the lastFetchFull property.

Parameters
value Allowed object is Boolean

public void setPartialAttribute (List<String> partialAttribute)

Sets the value of the partialAttribute property.

Parameters
partialAttribute Allowed object is String

public void setPartialAttributeMode (String value)

Sets the value of the partialAttributeMode property.

Parameters
value Allowed object is String

public void setSortOrder (List<SortAttribute> sortOrder)

Sets the value of the sortOrder property.

Parameters
sortOrder Allowed object is SortAttribute