com.genesyslab.platform.contacts.protocol.contactserver
Class SearchCriteriaBuilder
java.lang.Object
com.genesyslab.platform.contacts.protocol.contactserver.SearchCriteriaBuilder
public class SearchCriteriaBuilder
- extends java.lang.Object
SearchCriteria for certain Contact Server requests,
such as InteractionListGet, use an unfamiliar and generally
unexpected way to define the query expression tree.
For example: a AND (b OR c) is represented as:
AND
a
AND
OR
b
OR
c
Boolean operators are repeated for every child, instead of
appearing once and have many children.
As this is unexpected for most programmers, this helper class provided
for converting a usual recursive definition of the query expression,
to the one expected by Contact Server.
Example:
SearchCriteriaCollection A = SearchCriteriaBuilder.build("Id", Operators.Like, "*");
SearchCriteriaCollection B = SearchCriteriaBuilder.build("Id", Operators.NotEqual, "2");
SearchCriteriaCollection C = SearchCriteriaBuilder.build("Id", Operators.Lesser, "10");
SearchCriteriaCollection BC = SearchCriteriaBuilder.build(Prefixes.Or, B, C);
SearchCriteriaCollection result = SearchCriteriaBuilder.build(Prefixes.And, A, BC);
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SearchCriteriaBuilder
public SearchCriteriaBuilder()
build
public static SearchCriteriaCollection build(java.lang.String name,
Operators operator,
java.lang.String value)
- Creates SearchCriteriaCollection based on one simple search criterias.
- Parameters:
name
- attribute nameoperator
- operator typevalue
- attribute value
- Returns:
- SearchCriteriaCollection
build
public static SearchCriteriaCollection build(Prefixes prefix,
SearchCriteriaCollection... criterias)
- Creates SearchCriteriaCollection based on one or more search criteria collections.
- Parameters:
prefix
- criterias
- collection of search creterias
- Returns:
- SearchCriteriaCollection
Send comments on this topicTechpubs.webadmin@genesys.com.
Document version: 8.5.302.00
Copyright © 2006–2017 Genesys Telecommunications Laboratories, Inc. All rights reserved.