Interface IlrSearchCriteria
-
- All Known Implementing Classes:
- ilog.rules.teamserver.model.IlrActivityRuleSearchCriteria, IlrActivityTestingSearchCriteria, IlrDefaultSearchCriteria, ilog.rules.teamserver.model.IlrSearchCriteriaWithNotEqualFeature
public interface IlrSearchCriteria
IlrSearchCriteria
is the base interface for all classes that specify search criteria to pass to theIlrSession
findElements
search methods.Overview
Using
IlrSearchCriteria
you can view the properties set in a search criteria instance. These properties include the following:- A list of features to search in.
- A list of values to search for in the list of features.
- A Business Query Language (BQL) search string.
- The scope of the search: that is, if the search occurs in the current project only or includes dependent projects.
- The order in which to sort the search results.
- Whether the search results will be sorted in ascending or descending order.
IlrSearchCriteria
implementation isIlrDefaultSearchCriteria
. To create more advance functionality, you need to make your own customized implementation of this class.Code example
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); }
-
-
Method Summary
Methods 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 toIlrSession.findElements
with thisIlrSearchCritera
instance.java.lang.String
getQuery()
Gets the Business Query Language query that will be searched with whenIlrSession.findElements
is called.int
getScope()
Gets the scope of the search: that is, whether calls toIlrSession.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 toIlrSession.findElements
with this object will be sorted in ascending or descending order.
-
-
-
Method Detail
-
getEClass
org.eclipse.emf.ecore.EClass getEClass()
Gets an EMF class of the elements to be searched for.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
, orbrm.BusinessRule
.- Returns:
- An EMF class.
- See Also:
- Overview,
IlrDefaultSearchCriteria
-
getScope
int getScope()
Gets the scope of the search: that is, whether calls toIlrSession.findElements
with this object will search in the current project only or in the current project and its dependent projects.- Returns:
- One of the following:
- See Also:
- Overview,
IlrSession
,IlrDefaultSearchCriteria
-
getFeatures
java.util.List getFeatures()
Gets the list of features to be searched for.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.
- Returns:
- The list of
org.eclipse.emf.ecore.EStructuralFeature
objects that will be searched for. If no features were defined,null
is returned. - See Also:
- Overview,
getValues()
,IlrSession
, Custom search example,IlrDefaultSearchCriteria
-
getValues
java.util.List getValues()
Gets the list of the values to be searched for.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.
- Returns:
- The list of
org.eclipse.emf.ecore.EStructuralFeature
objects that will be searched for whenIlrSession.findElements
is called. If no values were defined,null
is returned. - See Also:
- Overview,
getFeatures()
,IlrSession
, Custom search example,IlrDefaultSearchCriteria
-
getQuery
java.lang.String getQuery()
Gets the Business Query Language query that will be searched with whenIlrSession.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.- Returns:
- A text query. If no query was defined in this
object,
null
is returned. - See Also:
- Overview,
IlrSession
, Custom search example,IlrDefaultSearchCriteria
-
getOrderBy
org.eclipse.emf.ecore.EStructuralFeature getOrderBy()
Gets the object that will be used to sort the results of a call toIlrSession.findElements
with thisIlrSearchCritera
instance.- Returns:
- An EMF feature. If no sort was defined in this
object,
null
is returned. - See Also:
- Overview,
IlrSession
,IlrDefaultSearchCriteria
-
isAscending
boolean isAscending()
Specifies whether the results of a call toIlrSession.findElements
with this object will be sorted in ascending or descending order.- Returns:
True
If the results of the search will be sorted in ascending order.- See Also:
- Overview,
Custom search example,
IlrSession
,IlrDefaultSearchCriteria
-
clone
java.lang.Object clone()
Returns a copy of this search criteria instance.- Returns:
- A copy of this search criteria instance.
- See Also:
- Overview
-
-