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.

Add Comment
1 Answer(s)

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

Agile Angel Answered on May 2, 2019.

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.

on May 2, 2019.

Thanks for the info. We are on 936 and I don’t see it in Javadoc. Will try to do some more testing

on May 2, 2019.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.