java.lang.Object | |||
↳ | org.mule.modules.oracle.model.AbstractDataObject | ||
↳ | com.oracle.xmlns.svc.DataObject | ||
↳ | com.oracle.xmlns.svc.DataCriteria |
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>
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
childDataCriteria | |||||||||||
fetchIndex | |||||||||||
fetchSize | |||||||||||
filter | |||||||||||
instanceCriteria | |||||||||||
lastFetchFull | |||||||||||
partialAttribute | |||||||||||
partialAttributeMode | |||||||||||
sortOrder |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Gets the value of the childDataCriteria property.
| |||||||||||
Gets the value of the fetchIndex property.
| |||||||||||
Gets the value of the fetchSize property.
| |||||||||||
Gets the value of the filter property.
| |||||||||||
Gets the value of the instanceCriteria property.
| |||||||||||
Gets the value of the lastFetchFull property.
| |||||||||||
Gets the value of the partialAttribute property.
| |||||||||||
Gets the value of the partialAttributeMode property.
| |||||||||||
Gets the value of the sortOrder property.
| |||||||||||
Sets the value of the childDataCriteria property.
| |||||||||||
Sets the value of the fetchIndex property.
| |||||||||||
Sets the value of the fetchSize property.
| |||||||||||
Sets the value of the filter property.
| |||||||||||
Sets the value of the instanceCriteria property.
| |||||||||||
Sets the value of the lastFetchFull property.
| |||||||||||
Sets the value of the partialAttribute property.
| |||||||||||
Sets the value of the partialAttributeMode property.
| |||||||||||
Sets the value of the sortOrder property.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.mule.modules.oracle.model.AbstractDataObject
| |||||||||||
From class
java.lang.Object
|
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
Gets the value of the fetchIndex property.
Gets the value of the fetchSize property.
Gets the value of the filter property.
DataObject
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
Gets the value of the lastFetchFull property. This getter has been renamed from isLastFetchFull() to getLastFetchFull() by cxf-xjc-boolean plugin.
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
Gets the value of the partialAttributeMode property.
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
Sets the value of the childDataCriteria property.
childDataCriteria | Allowed object is
ChildDataCriteria
|
---|
Sets the value of the fetchIndex property.
value | Allowed object is BigDecimal |
---|
Sets the value of the fetchSize property.
value | Allowed object is BigDecimal |
---|
Sets the value of the filter property.
value | Allowed object is
DataObject
|
---|
Sets the value of the instanceCriteria property.
instanceCriteria | Allowed object is
InstanceCriteria
|
---|
Sets the value of the lastFetchFull property.
value | Allowed object is Boolean |
---|
Sets the value of the partialAttribute property.
partialAttribute | Allowed object is String |
---|
Sets the value of the partialAttributeMode property.
value | Allowed object is String |
---|
Sets the value of the sortOrder property.
sortOrder | Allowed object is
SortAttribute
|
---|