org.eclipse.stardust.engine.api.query
Class DataFilter

java.lang.Object
  extended by org.eclipse.stardust.engine.api.query.AbstractDataFilter
      extended by org.eclipse.stardust.engine.api.query.DataFilter
All Implemented Interfaces:
Serializable, FilterCriterion, org.eclipse.stardust.engine.core.persistence.IEvaluationOptionProvider

public class DataFilter
extends org.eclipse.stardust.engine.api.query.AbstractDataFilter

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.eclipse.stardust.engine.api.query.AbstractDataFilter
MODE_ALL_FROM_HIERARCHY, MODE_ALL_FROM_SCOPE, MODE_SUBPROCESSES
 
Constructor Summary
DataFilter(String dataID, String attributeName, Operator.Binary operator, Serializable value, int filterMode)
           
DataFilter(String dataID, String attributeName, Operator.Ternary operator, Serializable value1, Serializable value2, int filterMode)
           
 
Method Summary
static DataFilter between(String dataID, Serializable lowerBound, Serializable upperBound)
          Creates a filter matching workflow data being both greater than or equal the given lowerBound and less than or equal the given upperBound.
static DataFilter between(String dataID, String attributeName, Serializable lowerBound, Serializable upperBound)
          Creates a filter matching workflow data being both greater than or equal the given lowerBound and less than or equal the given upperBound.
static org.eclipse.stardust.engine.api.query.AbstractDataFilter copy(org.eclipse.stardust.engine.api.query.AbstractDataFilter dataFilter, Serializable operand)
           
 boolean equals(Object obj)
           
static DataFilter equalsCaseDescriptor(String id, Object value)
          Creates a filter matching case descriptor being equal with the given value.
static DataFilter greaterOrEqual(String dataID, Serializable value)
          Creates a filter matching workflow data being greater than or equal the given value.
static DataFilter greaterOrEqual(String dataID, String attributeName, Serializable value)
          Creates a filter matching workflow data being greater than or equal the given value.
static DataFilter greaterThan(String dataID, Serializable value)
          Creates a filter matching workflow data being greater than the given value.
static DataFilter greaterThan(String dataID, String attributeName, Serializable value)
          Creates a filter matching workflow data being greater than the given value.
 int hashCode()
           
static DataFilter in(String dataID, Collection values)
          Creates a filter matching workflow data being equal one of the given values.
static DataFilter in(String dataID, String attributeName, Collection values)
          Creates a filter matching workflow data being equal one of the given values.
static DataFilter isEqual(String dataID, Serializable value)
          Creates a filter matching workflow data being equal with the given value.
static DataFilter isEqual(String dataID, String value, boolean caseSensitive)
          Creates a filter matching workflow data being equal with the given value.
static DataFilter isEqual(String dataID, String attributeName, Serializable value)
          Creates a filter matching workflow data being equal with the given value.
static DataFilter isEqual(String dataID, String attributeName, String value, boolean caseSensitive)
          Creates a filter matching workflow data being equal with the given value.
static DataFilter lessOrEqual(String dataID, Serializable value)
          Creates a filter matching workflow data being less than or equal the given value.
static DataFilter lessOrEqual(String dataID, String attributeName, Serializable value)
          Creates a filter matching workflow data being less than or equal the given value.
static DataFilter lessThan(String dataID, Serializable value)
          Creates a filter matching workflow data being less than the given value.
static DataFilter lessThan(String dataID, String attributeName, Serializable value)
          Creates a filter matching workflow data being less than the given value.
static DataFilter like(String dataID, String value)
          Creates a filter matching text workflow data according to the pattern given by value.
static DataFilter like(String dataID, String value, boolean caseSensitive)
          Creates a filter matching text workflow data according to the pattern given by value.
static DataFilter like(String dataID, String attributeName, String value)
          Creates a filter matching text workflow data according to the pattern given by value.
static DataFilter like(String dataID, String attributeName, String value, boolean caseSensitive)
          Creates a filter matching text workflow data according to the pattern given by value.
static DataFilter likeCaseDescriptor(String id, Object value)
          Creates a filter matching case descriptor using the like function with the given value.
static DataFilter notAnyOf(String dataID, String attributeName, Collection values)
          Creates a filter excluding PIs / AIs if any of workflow data matches one of the given values list.
static DataFilter notEqual(String dataID, Serializable value)
          Creates a filter matching workflow data being not equal with the given value.
static DataFilter notEqual(String dataID, String attributeName, Serializable value)
          Creates a filter matching workflow data being not equal with the given value.
static DataFilter notIn(String dataID, Collection values)
          Creates a filter matching workflow data being not equal one of the given values.
static DataFilter notIn(String dataID, String attributeName, Collection values)
          Creates a filter matching workflow data being not equal one of the given values.
 
Methods inherited from class org.eclipse.stardust.engine.api.query.AbstractDataFilter
accept, getAttributeName, getDataID, getFilterMode, getNormalizedAttributeName, getOperand, getOperator, getOption, getOptions, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DataFilter

public DataFilter(String dataID,
                  String attributeName,
                  Operator.Binary operator,
                  Serializable value,
                  int filterMode)

DataFilter

public DataFilter(String dataID,
                  String attributeName,
                  Operator.Ternary operator,
                  Serializable value1,
                  Serializable value2,
                  int filterMode)
Method Detail

isEqual

public static DataFilter isEqual(String dataID,
                                 Serializable value)
Creates a filter matching workflow data being equal with the given value.

Parameters:
dataID - The ID of the workflow data to be matched against.
value - The value to match with.
Returns:
The readily configured data filter.

isEqual

public static DataFilter isEqual(String dataID,
                                 String value,
                                 boolean caseSensitive)
Creates a filter matching workflow data being equal with the given value.

Parameters:
dataID - The ID of the workflow data to be matched against.
value - The string value to match with.
caseSensitive - Indicates if the search should be case sensitive or not.
Returns:
The readily configured data filter.

isEqual

public static DataFilter isEqual(String dataID,
                                 String attributeName,
                                 Serializable value)
Creates a filter matching workflow data being equal with the given value.

Parameters:
dataID - The ID of the workflow data to be matched against.
attributeName - The name of the data attribute to search for (XPath, etc.)
value - The value to match with.
Returns:
The readily configured data filter.

isEqual

public static DataFilter isEqual(String dataID,
                                 String attributeName,
                                 String value,
                                 boolean caseSensitive)
Creates a filter matching workflow data being equal with the given value.

Parameters:
dataID - The ID of the workflow data to be matched against.
attributeName - The name of the data attribute to search for (XPath, etc.)
value - The string value to match with.
caseSensitive - Indicates if the search should be case sensitive or not.
Returns:
The readily configured data filter.

notEqual

public static DataFilter notEqual(String dataID,
                                  Serializable value)
Creates a filter matching workflow data being not equal with the given value.

Parameters:
dataID - The ID of the workflow data to be matched against.
value - The value to match with.
Returns:
The readily configured data filter.

notEqual

public static DataFilter notEqual(String dataID,
                                  String attributeName,
                                  Serializable value)
Creates a filter matching workflow data being not equal with the given value.

Parameters:
dataID - The ID of the workflow data to be matched against.
attributeName - The name of the data attribute to search for (XPath, etc.)
value - The value to match with.
Returns:
The readily configured data filter.

lessThan

public static DataFilter lessThan(String dataID,
                                  Serializable value)
Creates a filter matching workflow data being less than the given value.

The meaning of being less than is specific to the type of the workflow data, i.e. arithmetic or lexical order.

Parameters:
dataID - The ID of the workflow data to be matched against.
value - The value to match with.
Returns:
The readily configured data filter.

lessThan

public static DataFilter lessThan(String dataID,
                                  String attributeName,
                                  Serializable value)
Creates a filter matching workflow data being less than the given value.

The meaning of being less than is specific to the type of the workflow data, i.e. arithmetic or lexical order.

Parameters:
dataID - The ID of the workflow data to be matched against.
attributeName - The name of the data attribute to search for (XPath, etc.)
value - The value to match with.
Returns:
The readily configured data filter.

lessOrEqual

public static DataFilter lessOrEqual(String dataID,
                                     Serializable value)
Creates a filter matching workflow data being less than or equal the given value.

The meaning of being less than is specific to the type of the workflow data, i.e. arithmetic or lexical order.

Parameters:
dataID - The ID of the workflow data to be matched against.
value - The value to match with.
Returns:
The readily configured data filter.

lessOrEqual

public static DataFilter lessOrEqual(String dataID,
                                     String attributeName,
                                     Serializable value)
Creates a filter matching workflow data being less than or equal the given value.

The meaning of being less than is specific to the type of the workflow data, i.e. arithmetic or lexical order.

Parameters:
dataID - The ID of the workflow data to be matched against.
attributeName - The name of the data attribute to search for (XPath, etc.)
value - The value to match with.
Returns:
The readily configured data filter.

greaterOrEqual

public static DataFilter greaterOrEqual(String dataID,
                                        Serializable value)
Creates a filter matching workflow data being greater than or equal the given value.

The meaning of being greater than is specific to the type of the workflow data, i.e. arithmetic or lexical order.

Parameters:
dataID - The ID of the workflow data to be matched against.
value - The value to match with.
Returns:
The readily configured data filter.

greaterOrEqual

public static DataFilter greaterOrEqual(String dataID,
                                        String attributeName,
                                        Serializable value)
Creates a filter matching workflow data being greater than or equal the given value.

The meaning of being greater than is specific to the type of the workflow data, i.e. arithmetic or lexical order.

Parameters:
dataID - The ID of the workflow data to be matched against.
attributeName - The name of the data attribute to search for (XPath, etc.)
value - The value to match with.
Returns:
The readily configured data filter.

greaterThan

public static DataFilter greaterThan(String dataID,
                                     Serializable value)
Creates a filter matching workflow data being greater than the given value.

The meaning of being greater than is specific to the type of the workflow data, i.e. arithmetic or lexical order.

Parameters:
dataID - The ID of the workflow data to be matched against.
value - The value to match with.
Returns:
The readily configured data filter.

greaterThan

public static DataFilter greaterThan(String dataID,
                                     String attributeName,
                                     Serializable value)
Creates a filter matching workflow data being greater than the given value.

The meaning of being greater than is specific to the type of the workflow data, i.e. arithmetic or lexical order.

Parameters:
dataID - The ID of the workflow data to be matched against.
attributeName - The name of the data attribute to search for (XPath, etc.)
value - The value to match with.
Returns:
The readily configured data filter.

like

public static DataFilter like(String dataID,
                              String value)
Creates a filter matching text workflow data according to the pattern given by value.

The pattern language syntax is that of SQL LIKE patterns. For details please check the documentation of your database backend.

Parameters:
dataID - The ID of the workflow data to be matched against.
value - The value to match with.
Returns:
The readily configured data filter.

like

public static DataFilter like(String dataID,
                              String value,
                              boolean caseSensitive)
Creates a filter matching text workflow data according to the pattern given by value.

The pattern language syntax is that of SQL LIKE patterns. For details please check the documentation of your database backend.

Parameters:
dataID - The ID of the workflow data to be matched against.
value - The value to match with.
caseSensitive - Indicates if the search should be case sensitive or not.
Returns:
The readily configured data filter.

like

public static DataFilter like(String dataID,
                              String attributeName,
                              String value)
Creates a filter matching text workflow data according to the pattern given by value.

The pattern language syntax is that of SQL LIKE patterns. For details please check the documentation of your database backend.

Parameters:
dataID - The ID of the workflow data to be matched against.
attributeName - The name of the data attribute to search for (XPath, etc.)
value - The value to match with.
Returns:
The readily configured data filter.

like

public static DataFilter like(String dataID,
                              String attributeName,
                              String value,
                              boolean caseSensitive)
Creates a filter matching text workflow data according to the pattern given by value.

The pattern language syntax is that of SQL LIKE patterns. For details please check the documentation of your database backend.

Parameters:
dataID - The ID of the workflow data to be matched against.
attributeName - The name of the data attribute to search for (XPath, etc.)
value - The value to match with.
caseSensitive - Indicates if the search should be case sensitive or not.
Returns:
The readily configured data filter.

in

public static DataFilter in(String dataID,
                            Collection values)
Creates a filter matching workflow data being equal one of the given values.

Parameters:
dataID - The ID of the workflow data to be matched against.
values - The list of values to match with.
Returns:
The readily configured data filter.
Throws:
org.eclipse.stardust.common.error.PublicException - If not all elements of values are instances of exactly the same Java class.

in

public static DataFilter in(String dataID,
                            String attributeName,
                            Collection values)
Creates a filter matching workflow data being equal one of the given values.

Parameters:
dataID - The ID of the workflow data to be matched against.
attributeName - The name of the data attribute to search for (XPath, etc.)
values - The list of values to match with.
Returns:
The readily configured data filter.
Throws:
org.eclipse.stardust.common.error.PublicException - If not all elements of values are instances of exactly the same Java class.

notIn

public static DataFilter notIn(String dataID,
                               Collection values)
Creates a filter matching workflow data being not equal one of the given values.

Parameters:
dataID - The ID of the workflow data to be matched against.
values - The list of values to not match with.
Returns:
The readily configured data filter.
Throws:
org.eclipse.stardust.common.error.PublicException - If not all elements of values are instances of exactly the same Java class.

notIn

public static DataFilter notIn(String dataID,
                               String attributeName,
                               Collection values)
Creates a filter matching workflow data being not equal one of the given values.

Parameters:
dataID - The ID of the workflow data to be matched against.
attributeName - The name of the data attribute to search for (XPath, etc.)
values - The list of values to not match with.
Returns:
The readily configured data filter.
Throws:
org.eclipse.stardust.common.error.PublicException - If not all elements of values are instances of exactly the same Java class.

notAnyOf

public static DataFilter notAnyOf(String dataID,
                                  String attributeName,
                                  Collection values)
Creates a filter excluding PIs / AIs if any of workflow data matches one of the given values list. This filter only applies for SDV list nodes.

Parameters:
dataID - The ID of the workflow data to be matched against.
attributeName - The name of the data attribute to search for (XPath, etc.). Only SDV list nodes.
values - The list of values to match with which will exclude from result set.
Returns:
The readily configured data filter.
Throws:
org.eclipse.stardust.common.error.PublicException - If not all elements of values are instances of exactly the same Java class.
org.eclipse.stardust.common.error.PublicException - If list of values is empty.

between

public static DataFilter between(String dataID,
                                 Serializable lowerBound,
                                 Serializable upperBound)
Creates a filter matching workflow data being both greater than or equal the given lowerBound and less than or equal the given upperBound.

The meaning of being less than or greater than is specific to the type of the workflow data, i.e. arithmetic or lexical order.

Parameters:
dataID - The ID of the workflow data to be matched against.
lowerBound - The lower bound of the value range to match with.
upperBound - The upper bound of the value range to match with.
Returns:
The readily configured data filter.
Throws:
org.eclipse.stardust.common.error.PublicException - If lowerBound and upperBound are not instances of exactly the same Java class.

between

public static DataFilter between(String dataID,
                                 String attributeName,
                                 Serializable lowerBound,
                                 Serializable upperBound)
Creates a filter matching workflow data being both greater than or equal the given lowerBound and less than or equal the given upperBound.

The meaning of being less than or greater than is specific to the type of the workflow data, i.e. arithmetic or lexical order.

Parameters:
dataID - The ID of the workflow data to be matched against.
attributeName - The name of the data attribute to search for (XPath, etc.)
lowerBound - The lower bound of the value range to match with.
upperBound - The upper bound of the value range to match with.
Returns:
The readily configured data filter.
Throws:
org.eclipse.stardust.common.error.PublicException - If lowerBound and upperBound are not instances of exactly the same Java class.

equalsCaseDescriptor

public static DataFilter equalsCaseDescriptor(String id,
                                              Object value)
Creates a filter matching case descriptor being equal with the given value.

Parameters:
id - descriptor id.
value - the required descriptor value.
Returns:
The configured data filter.

likeCaseDescriptor

public static DataFilter likeCaseDescriptor(String id,
                                            Object value)
Creates a filter matching case descriptor using the like function with the given value.

Parameters:
id - descriptor id.
value - the required descriptor value.
Returns:
The configured data filter.

hashCode

public int hashCode()
Overrides:
hashCode in class org.eclipse.stardust.engine.api.query.AbstractDataFilter

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

copy

public static org.eclipse.stardust.engine.api.query.AbstractDataFilter copy(org.eclipse.stardust.engine.api.query.AbstractDataFilter dataFilter,
                                                                            Serializable operand)


Copyright © 2017 Eclipse Stardust. All Rights Reserved.