ALBPM Process API (PAPI)

fuego.papi
Interface FilterAttribute

All Superinterfaces:
Serializable

public interface FilterAttribute
extends Serializable

Represents a single condition in a Filter.

There are four variables in this class:

FilterAttributes are created using Filter.addAttribute(VarDefinition, Comparison, Object, boolean).

Example: Obtain the instances where received time is before now.

          // get a ProcessServiceNESession
          ProcessServiceNESession session =  …;

          // for default VarDefinitions, use VarDefinition.getDefaultVarDefinition,
          // and use the VarDefinition field name.
          VarDefinition variable = VarDefinition.getDefaultVarDefinition(VarDefinition.RECEIVE_ID);

          Filter filter = ProcessService.createFilter();

          filter.addAttribute(variable, Comparison.BEFORE, Time.now());

          InstanceInfo[] instances = session.getInstancesByFilter(new String[] { "/MyProcessId" }, filter);
 

Example: Obtain the instances where external variable "MyVariable" is 123.

          //get a ProcessServiceNESession
          ProcessServiceNESession session =  …;

          //for external variables, use session.getVar with the name of the external variable
          VarDefinition variable = session.getVar("MyVariable");

          Filter filter = ProcessService.createFilter();

          filter.addAttribute(variable, Comparison.IS, new Integer(123));

          InstanceInfo[] instances = session.getInstancesByFilter(new String[] { "/MyProcessId" }, filter);
 


Field Summary
static String CURRENT_USER
          Special participant value, this value represent the participant which execute the filter.
 
Method Summary
 Comparison getComparison()
          Gets the comparison of the expression
 int getKind()
          Gets the kind of the VarDefinition to compare
 String getSQLExpression(boolean caseSensitive)
          Gets the SQL Expression generated by the FilterAttribute.
 Object getValue()
          Gets the value to use in the expresion to compare with the instance attribute value.
 VarDefinition getVariable()
          Gets the VarDefinition to compare.
 String getVariableId()
          Gets the Id of the VarDefinition to compare
 boolean isParametric()
          Returns true if this FilterAttribute is parametric.
 void setComparison(Comparison comparison)
          Sets the comparison of the expression.
 void setParametric(boolean parametric)
          Sets if this FilterAttribute is parametric or not.
 void setValue(Object value)
          Sets the value to use in the expresion to compare with the instance attribute value.
 

Field Detail

CURRENT_USER

public static final String CURRENT_USER
Special participant value, this value represent the participant which execute the filter.

See Also:
Constant Field Values
Method Detail

setComparison

public void setComparison(Comparison comparison)
Sets the comparison of the expression.

Parameters:
comparison - new Comparison to set.
See Also:
fuego.papi.Comparison

getComparison

public Comparison getComparison()
Gets the comparison of the expression

Returns:
Comparison
See Also:
fuego.papi.Comparison

getKind

public int getKind()
Gets the kind of the VarDefinition to compare

Returns:
Kind.
See Also:
Kind

setParametric

public void setParametric(boolean parametric)
Sets if this FilterAttribute is parametric or not. A Parametric Filter Attribute define that the Filter Attribute does not have a static value to compare.

Parameters:
parametric - true if this FilterAttribute is parametric.

isParametric

public boolean isParametric()
Returns true if this FilterAttribute is parametric.

Returns:
true if is paramteric.

getSQLExpression

public String getSQLExpression(boolean caseSensitive)
Gets the SQL Expression generated by the FilterAttribute.

Parameters:
caseSensitive - true if you use case sensitive strings.
Returns:
SQL Expression generated by the FilterAttribute.

setValue

public void setValue(Object value)
Sets the value to use in the expresion to compare with the instance attribute value.

Parameters:
value - Object to compare with the instance attribute value.

getValue

public Object getValue()
Gets the value to use in the expresion to compare with the instance attribute value.

Returns:
The object to compare.

getVariable

public VarDefinition getVariable()
Gets the VarDefinition to compare.

Returns:
VarDefinition to compare
See Also:
VarDefinition

getVariableId

public String getVariableId()
Gets the Id of the VarDefinition to compare

Returns:
id of the VarDefinition to compare.

ALBPM Process API (PAPI)

© Copyright 1996/2005 Fuego Inc. All Rights Reserved