public interface IlrSearchCriteria
IlrSearchCriteria is the base interface for all classes that
specify search criteria to pass to the IlrSession
findElements search methods.
Using IlrSearchCriteria you can view the properties set in
a search criteria instance. These properties include the following:
IlrSearchCriteria implementation is
IlrDefaultSearchCriteria. To create more advance functionality, you
need to make your own customized implementation of this class.
The following code example shows how to connect to Decision Center and run a query on the server from a client Java application:
String query = new String(
"Find all business rules such that "
+ "the last modification date of each "
+ "business rule is after 10/27/05 2:55:25 PM");
IlrSearchCriteria criteria = new IlrDefaultSearchCriteria(
query.toString());
List summaries = session.findElements(
criteria,
IlrModelConstants.ELEMENT_SUMMARY);
for (int i = 0; i < summaries.size(); i++) {
IlrElementSummary ruleSummary = (IlrElementSummary) summaries.get(i);
String ruleName = ruleSummary.getName();
System.out.println("\t" + ruleName);
}
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone()
Returns a copy of this search criteria instance.
|
org.eclipse.emf.ecore.EClass |
getEClass()
Gets an EMF class of the elements to be searched for.
|
java.util.List |
getFeatures()
Gets the list of features to be searched for.
|
org.eclipse.emf.ecore.EStructuralFeature |
getOrderBy()
Gets the object that will be used to sort the results of a call to
IlrSession.findElements with this
IlrSearchCritera instance. |
java.lang.String |
getQuery()
Gets the Business Query Language query that will be searched with when
IlrSession.findElements is called. |
int |
getScope()
Gets the scope of the search: that is, whether calls to
IlrSession.findElements with this object will search
in the current project only or in the current project and its dependent
projects. |
java.util.List |
getValues()
Gets the list of the values to be searched for.
|
boolean |
isAscending()
Specifies whether the results of a call to
IlrSession.findElements
with this object will be sorted in ascending or descending order. |
org.eclipse.emf.ecore.EClass getEClass()
If a query is set, the value returned must be a super class of the query's EMF class. For example, if the query is:
"for each action rule such that ..."
brm.ActionRule, or
brm.BusinessRule.IlrDefaultSearchCriteriaint getScope()
IlrSession.findElements with this object will search
in the current project only or in the current project and its dependent
projects.IlrSession,
IlrDefaultSearchCriteriajava.util.List getFeatures()
If a Business Query Language query is set in this object, calls to
IlrSession.findElements with this object will return the
elements that match the features, values and query in this search
criteria instance.
Note: This list of features must have a corresponding list of values.
org.eclipse.emf.ecore.EStructuralFeature
objects that will be searched for. If no features were defined,
null is returned.getValues(),
IlrSession,
Custom search example,
IlrDefaultSearchCriteriajava.util.List getValues()
If a Business Query Language query is set in this object, calls to
IlrSession.findElements with this object will return the
elements that match the features, values and query in this search
criteria instance.
Note: This list of values must have a corresponding list of features.
org.eclipse.emf.ecore.EStructuralFeature
objects that will be searched for when
IlrSession.findElements is called. If no values were defined,
null is returned.getFeatures(),
IlrSession,
Custom search example,
IlrDefaultSearchCriteriajava.lang.String getQuery()
IlrSession.findElements is called.
If features and values are set in this object, calls to
IlrSession.findElements with this object will return the
elements that match the features, values and query in this search
criteria instance.
null is returned.IlrSession,
Custom search example,
IlrDefaultSearchCriteriaorg.eclipse.emf.ecore.EStructuralFeature getOrderBy()
IlrSession.findElements with this
IlrSearchCritera instance.null is returned.IlrSession,
IlrDefaultSearchCriteriaboolean isAscending()
IlrSession.findElements
with this object will be sorted in ascending or descending order.True If the results of the search will be sorted in
ascending order.IlrSession,
IlrDefaultSearchCriteriajava.lang.Object clone()
© Copyright IBM Corp. 1987, 2017