Examples for IPersonalCriteriaManager#createCritera
Are there any online examples demonstrating how to create Criteria using the API? I see the CriteriaConstants, and understand how the API typically uses a Map as it’s input parameters. However, the Criteria’s appear to be constructed of a Tree of these Constants, and I’m hoping someone has an example of how to construct this tree.
I’m looking at the IPersonalCriteriaManager#createCriteria method.
Hello
Not all Admin functions are possible via SDK. You can definitely get all metadata of admin nodes, but creation/update is limited to only User administrator (User group/User management) and Lists
So, I don’t believe you can create criteria using SDK
Checking Javadoc, i just see the following 3 for ICriteria (btw, i don’t see IPersonalCriteriaManager)
getCriteriaClass(), getCriteria() and isCaseSensitive ()
– Raj
The API to create the Criteria via the SDK 100% exists. The methods are there on com.agile.api.IPersonalCriteriaManager. I am using version 9.3.3.
package com.agile.api;
public abstract interface IPersonalCriteriaManager
extends IManager
{
public abstract ICriteria[] getCriteria()
throws APIException;
public abstract ICriteria createCriteria(Object paramObject)
throws APIException;
public abstract void removeCriteria(ICriteria[] paramArrayOfICriteria)
throws APIException;
}
and the constants for creating the Criteria are:
CriteriaConstants,KEY_ATTRIBUTE
CriteriaConstants,KEY_RELATIONAL_OPERATOR
CriteriaConstants,KEY_VALUE
CriteriaConstants,KEY_LOGICAL_OPERATOR
CriteriaConstants,KEY_LEFT_PARENTHISIS
CriteriaConstants,KEY_RIGHT_PARENTHISIS
CriteriaConstants,KEY_RELATIONAL_OPERATOR_MODIFIER
CriteriaConstants,KEY_PARAMETERIZED
CriteriaConstants,LOP_AND
CriteriaConstants,LOP_OR
But because the Criteria is an unbounded set of Operators, it’s not a simple key/value pair creation.