ALBPM Process API

fuego.papi
Interface FilterAttribute

All Superinterfaces:
Serializable

public interface FilterAttribute
extends Serializable

This interface represent an expression in a Filter.

You could find three variables in this class,

Ex.

Obtain the instances where received time is before now.
        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);
    
Obtain the instances where external varible "MyVariable" is 123
        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 witch execute the filter.
static long serialCheck
           
static long serialVersionUID
           
 
Method Summary
 Comparison getComparison()
          Return the comparion of the expresion
 int getKind()
          Return the kind of the VarDefinition to compare
 String getSQLExpression(boolean caseSensitive)
          Return a String with the SQL Expression generated by the FilterAttribute.
 Object getValue()
          Return the value to use in the expresion to compare with the instance attribute value.
 VarDefinition getVariable()
          Return the VarDefinition to compare.
 String getVariableId()
          Return the id of the VarDefinition to compare
 boolean isParametric()
          Return if is parametric or not.
 void setComparison(Comparison comparison)
          Change the comparison of the expression.
 void setParametric(boolean parametric)
          Set if this FilterAttribute is parametric or not.
 void setValue(Object value)
          Set the value to use in the expression.
 

Field Detail

CURRENT_USER

@NonNls
static final String CURRENT_USER
Special participant value, this value represent the participant witch execute the filter.

See Also:
Constant Field Values

serialCheck

static final long serialCheck
See Also:
Constant Field Values

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values
Method Detail

setComparison

void setComparison(Comparison comparison)
Change the comparison of the expression.

Parameters:
comparison - New Comparison to set.
See Also:
Comparison

getComparison

Comparison getComparison()
Return the comparion of the expresion

Returns:
A Comparison
See Also:
Comparison

getKind

int getKind()
Return the kind of the VarDefinition to compare

Returns:
A Kind.
See Also:
Kind

setParametric

void setParametric(boolean parametric)
Set 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, False if not.

isParametric

boolean isParametric()
Return if is parametric or not.

Returns:
True if is paramteric

getSQLExpression

String getSQLExpression(boolean caseSensitive)
Return a String with the SQL Expression generated by the FilterAttribute.

Parameters:
caseSensitive - True if you use case sensitive strings.
Returns:
A String with an SQL Expression

setValue

void setValue(Object value)
Set the value to use in the expression.

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

getValue

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

Returns:
The object to compare.

getVariable

VarDefinition getVariable()
Return the VarDefinition to compare.

WARNING: Can return null. Use ProcessServiceSession.variableGet(String).
Ex. VarDefinition variable = processServiceSession.variableGet(filterAttribute.getVariableId());

Returns:
The VarDefinition to compare
See Also:
VarDefinition

getVariableId

String getVariableId()
Return the id of the VarDefinition to compare

Returns:
The id of the VarDefinition.

ALBPM Process API

© Copyright 1996/2005 Fuego Inc. All Rights Reserved