ilog.rules.teamserver.model

Class IlrDefaultSearchCriteria

  • java.lang.Object
    • ilog.rules.teamserver.model.IlrDefaultSearchCriteria
    • Constructor Summary

      Constructors 
      Constructor and Description
      IlrDefaultSearchCriteria(org.eclipse.emf.ecore.EClass eclass)
      Creates a search criterion that will be used to retrieve the elements of a given class in the current project.
      IlrDefaultSearchCriteria(org.eclipse.emf.ecore.EClass eclass, java.util.List features, java.util.List values)
      Creates a search criterion that will be used to retrieve specific values from a list of features chosen from elements of a specific class stored in Decision Center.
      IlrDefaultSearchCriteria(org.eclipse.emf.ecore.EClass eclass, java.util.List features, java.util.List values, java.lang.String query, int scope, org.eclipse.emf.ecore.EStructuralFeature orderBy, boolean ascending)
      Creates a fully customizable search criteria.
      IlrDefaultSearchCriteria(java.lang.String query)
      Creates a search criterion that gets the elements matching the given query.
    • 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 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.
      boolean isOrderById() 
      boolean isSystemLockSearchCriteria() 
      void setEngineFallback(boolean mode)
      To be used when a translation issue is known, and rule engine should be used to run the query.
      java.lang.String toString() 
      void unsetOrderById() 
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • IlrDefaultSearchCriteria

        public IlrDefaultSearchCriteria(org.eclipse.emf.ecore.EClass eclass,
                                java.util.List features,
                                java.util.List values,
                                java.lang.String query,
                                int scope,
                                org.eclipse.emf.ecore.EStructuralFeature orderBy,
                                boolean ascending)
        Creates a fully customizable search criteria.
        Parameters:
        eclass - The EMF class of the searched elements. If query is set, this must be a super class of the query's EMF class. For example, if the query is "for each action rule such that ...", the EMF class must be brm.ActionRule, or brm.BusinessRule. This parameter can be set to null if the query parameter is non-null.
        features - The list of features to search in. Set to Collections.EMPTY_LIST if you do not want to filter the features to be searched in.
        values - The list of values to search for. Set to Collections.EMPTY_LIST if no value is provided.
        query - A query string written in Business Query Language. For example: "find all business rules such that the name of each business rule starts with 'loan'").
        scope - The scope of the search: that is, if the search occurs in the current project only or includes dependent projects. Use one of the following values:
        orderBy - The order in which the search results are sorted.
        ascending - Set to true so the search results are sorted in ascending order.
        See Also:
        Overview, Code Example
      • IlrDefaultSearchCriteria

        public IlrDefaultSearchCriteria(org.eclipse.emf.ecore.EClass eclass,
                                java.util.List features,
                                java.util.List values)
        Creates a search criterion that will be used to retrieve specific values from a list of features chosen from elements of a specific class stored in Decision Center.

        Calling this constructor is the equivalent of calling the following:

           IlrDefaultSearchCriteria(
             eclass,
             features,
             values,
             null,
             IlrModelConstants.DEFAULT_SCOPE,
             null,
             true)
         
        The default scope is SCOPE_PROJECT_AND_DEPENDENCIES.

        Parameters:
        eclass - The EMF class of the elements to search for. For example, set to brm.ActionRule to search for all the action rules in this project and its dependencies. This parameter cannot be set to null.
        features - The list of features to search in. Set to Collections.EMPTY_LIST if you do not want to filter the feature to be searched in.
        values - The list of values to search for. Set to Collections.EMPTY_LIST if no value is provided.
        See Also:
        Overview, Code Example, IlrDefaultSearchCriteria(EClass, List, List, String, int, EStructuralFeature, boolean)
      • IlrDefaultSearchCriteria

        public IlrDefaultSearchCriteria(org.eclipse.emf.ecore.EClass eclass)
        Creates a search criterion that will be used to retrieve the elements of a given class in the current project.

        Calling this constructor is the equivalent of calling the following:

           IlrDefaultSearchCriteria(
             eclass,
             Collections.EMPTY_LIST,
             Collections.EMPTY_LIST,
             null,
             IlrModelConstants.DEFAULT_SCOPE,
             null,
             true)
         
        The default scope is SCOPE_PROJECT_AND_DEPENDENCIES.
        Parameters:
        eclass - The EMF class of the elements to search. For example, set to brm.ActionRule to search for all the action rules in this project and its dependencies. This parameter cannot be set to null.
        See Also:
        Overview, Code Example, IlrDefaultSearchCriteria(EClass, List, List, String, int, EStructuralFeature, boolean)
      • IlrDefaultSearchCriteria

        public IlrDefaultSearchCriteria(java.lang.String query)
        Creates a search criterion that gets the elements matching the given query.

        Calling this constructor is the equivalent of calling the following:

           IlrDefaultSearchCriteria(
             null,
             Collections.EMPTY_LIST,
             Collections.EMPTY_LIST,
             query,
             IlrModelConstants.DEFAULT_SCOPE,
             null,
             true);
         
         The default scope is
         SCOPE_PROJECT_AND_DEPENDENCIES.
        Parameters:
        query - A query string written in Business Query Language. For example: "find all business rules such that the name of each business rule starts with 'loan'").
        See Also:
        Overview, Code Example, IlrDefaultSearchCriteria(EClass, List, List, String, int, EStructuralFeature, boolean)
    • Method Detail

      • getQuery

        public java.lang.String getQuery()
        Description copied from interface: IlrSearchCriteria
        Gets the Business Query Language query that will be searched with when 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.

        Specified by:
        getQuery in interface IlrSearchCriteria
        Returns:
        A text query. If no query was defined in this object, null is returned.
        See Also:
        Overview, IlrSession, Custom search example, IlrDefaultSearchCriteria
      • getFeatures

        public java.util.List getFeatures()
        Description copied from interface: IlrSearchCriteria
        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.

        Specified by:
        getFeatures in interface IlrSearchCriteria
        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, IlrSearchCriteria.getValues(), IlrSession, Custom search example, IlrDefaultSearchCriteria
      • getValues

        public java.util.List getValues()
        Description copied from interface: IlrSearchCriteria
        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.

        Specified by:
        getValues in interface IlrSearchCriteria
        Returns:
        The list of org.eclipse.emf.ecore.EStructuralFeature objects that will be searched for when IlrSession.findElements is called. If no values were defined, null is returned.
        See Also:
        Overview, IlrSearchCriteria.getFeatures(), IlrSession, Custom search example, IlrDefaultSearchCriteria
      • getOrderBy

        public org.eclipse.emf.ecore.EStructuralFeature getOrderBy()
        Description copied from interface: IlrSearchCriteria
        Gets the object that will be used to sort the results of a call to IlrSession.findElements with this IlrSearchCritera instance.
        Specified by:
        getOrderBy in interface IlrSearchCriteria
        Returns:
        An EMF feature. If no sort was defined in this object, null is returned.
        See Also:
        Overview, IlrSession, IlrDefaultSearchCriteria
      • unsetOrderById

        public void unsetOrderById()
      • isOrderById

        public boolean isOrderById()
      • setEngineFallback

        public void setEngineFallback(boolean mode)
        To be used when a translation issue is known, and rule engine should be used to run the query.
      • getEClass

        public org.eclipse.emf.ecore.EClass getEClass()
        Description copied from interface: IlrSearchCriteria
        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 ..."

        the EMF class must be brm.ActionRule, or brm.BusinessRule.
        Specified by:
        getEClass in interface IlrSearchCriteria
        Returns:
        An EMF class.
        See Also:
        Overview, IlrDefaultSearchCriteria
      • clone

        public java.lang.Object clone()
        Description copied from interface: IlrSearchCriteria
        Returns a copy of this search criteria instance.
        Specified by:
        clone in interface IlrSearchCriteria
        Overrides:
        clone in class java.lang.Object
        Returns:
        A copy of this search criteria instance.
        See Also:
        Overview
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • isSystemLockSearchCriteria

        public boolean isSystemLockSearchCriteria()

© Copyright IBM Corp. 1987, 2020