There are two types of Conditions in Condition Expression Manager:
1. Expression
2. Class
To use Type Class in Condition, need to create a custom condition class.
1. Create a custom condition class which implements CustomCondition interface.
eg:
public class ConditionClass implements CustomCondition {
if(<business logic>)
1. Expression
2. Class
To use Type Class in Condition, need to create a custom condition class.
1. Create a custom condition class which implements CustomCondition interface.
eg:
public class ConditionClass implements CustomCondition {
public boolean evaluateCondition(MboRemote mbo, Object param)throws MXException, RemoteException
{
<business logic>
return true;
return true;
}
else{
<business logic>
return false
}
else{
<business logic>
return false
}
}
public String toWhereClause(Object parm, MboSetRemote msr)throws MXException, RemoteException
public String toWhereClause(Object parm, MboSetRemote msr)throws MXException, RemoteException
{
<business logic>
return <sql>
}
}
}
2. CustomCondition interface have two methods:
a. evaluateCondition(MboRemote mbo, Object param): this method is used to evaluate condition and returns either true or false based on the business logic written in it. This return boolean value.
a. evaluateCondition(MboRemote mbo, Object param): this method is used to evaluate condition and returns either true or false based on the business logic written in it. This return boolean value.
b.toWhereClause(Object parm, MboSetRemote msr) : This method is used to return sql to the object which this condition is applied.This returns String.
No comments:
Post a Comment