Novell exteNd
Director 5.2 API

com.sssw.cm.util
Class EboDocQueryOpUtil

java.lang.Object
 |
 +--com.sssw.cm.util.EboDocQueryOpUtil

public class EboDocQueryOpUtil
extends Object

This class contains utility methods for managing information about operators that are used in Document queries.


Field Summary
static int ALL_OP_TYPES
          The concatenated value for all the operator types.
static int IDX_OP_BETWEEN
          The index of the 'between' operator.
static int IDX_OP_IN
          The index of the 'in' operator.
static int IDX_OP_IS_NULL
          The index of the 'is null' operator.
static int IDX_ROP_EQUAL
          The index of the equality operator.
static int IDX_ROP_GEQ
          The index of the 'greater than or equal to' operator.
static int IDX_ROP_GREATER
          The index of the 'greater than' operator.
static int IDX_ROP_LEQ
          The index of the 'less than or equal to' operator.
static int IDX_ROP_LESS
          The index of the 'less than' operator.
static int IDX_SOP_ENDS_WITH
          The index of the 'ends with' operator.
static int IDX_SOP_EQUALS_IGNORE_CASE
          The index of the 'equals-ignore-case' operator.
static int IDX_SOP_LIKE
          The index of the 'like' operator.
static int IDX_SOP_LIKE_IGNORE_CASE
          The index of the 'like-ignore-case' operator.
static int IDX_SOP_STARTS_WITH
          The index of the 'starts with' operator.
static String OP_BETWEEN
          The 'between' operator (equivalent to 'BETWEEN' in SQL).
static String OP_IN
          The 'in' operator (equivalent to 'IN' in SQL).
static String OP_IS_NULL
          The 'isNull' operator (equivalent to the 'IS NULL' condition in SQL).
static int OP_KIND_BINARY
          The operator kind of "binary" (an operator that works on two operands).
static int OP_KIND_INVALID
          The value to indicate an invalid operator kind.
static int OP_KIND_NARY
          The operator kind of "n-ary" (an operator that works on N number of operands).
static int OP_KIND_TERNARY
          The operator kind of "ternary" (an operator that works on three operands).
static int OP_KIND_UNARY
          The operator kind of "unary" (an operator that works on one operand).
static int OP_TYPE_INVALID
          The value to indicate an invalid operator type.
static int OP_TYPE_OTHER
          The operator type of 'other operators'.
static int OP_TYPE_REL
          The operator type of 'relational operators'.
static int OP_TYPE_STR
          The operator type of 'string operators'.
static String ROP_EQUAL
          The relational equality operator ('=' in SQL).
static String ROP_GEQ
          The relational 'greater than or equal to' operator ('>=' in SQL).
static String ROP_GREATER
          The relational 'greater than' operator ('>' in SQL).
static String ROP_LEQ
          The relational 'less than or equal to' operator ('<=' in SQL).
static String ROP_LESS
          The relational 'less than' operator ('<' in SQL).
static String SOP_ENDS_WITH
          The 'endsWith' string operator (equivalent to, for example, LIKE '%bar' in SQL).
static String SOP_EQUALS_IGNORE_CASE
          The 'equalsIgnoreCase' string operator (in SQL, equivalent to, for example, (LCASE("Customer"."FirstName") = LCASE('Susan'))).
static String SOP_LIKE
          The 'like' string operator ('LIKE' in SQL).
static String SOP_LIKE_IGNORE_CASE
          The 'like-ignore-case' string operator ('LIKE' in SQL, but executed in a case-insensitive fashion, e.g.
static String SOP_STARTS_WITH
          The 'startsWith' string operator (equivalent to, for example, LIKE 'foo%' in SQL).
static int SORT_BY_OP_DISPLAY_NAME
          Sort mode of "sort by operator display name".
static int SORT_BY_OP_INDEX
          Sort mode of "sort by operator index".
static int SORT_BY_OP_KIND
          Sort mode of "sort by operator kind".
static int SORT_BY_OP_NAME
          Sort mode of "sort by operator name".
static int SORT_BY_OP_TYPE
          Sort mode of "sort by operator type".
 
Constructor Summary
EboDocQueryOpUtil()
           
 
Method Summary
static int getOperatorCount()
          Gets the number of the available operators.
static EbiOperatorDescriptor getOperatorDescriptor(int index, Locale locale)
          Given the index of an operator, returns the Operator Descriptor.
static Collection getOperatorDescriptors(int opTypes, Locale locale, int sortBy, int[] exclusions)
          Gets a collection of Operator Descriptors for all the available operators, in a sorted fashion, with an option to filter out some specific operators.
static Collection getOperatorDescriptors(Locale locale)
          Gets a collection of Operator Descriptors for all the available operators.
static Collection getOperatorDescriptors(Locale locale, int sortBy)
          Gets a collection of Operator Descriptors for all the available operators, in a sorted fashion.
static String getOperatorDisplayName(int index, Locale locale)
          Given the index of an operator, gets a user-friendly, displayable string describing the operator.
static int getOperatorIndex(String opName)
          Given the operator name, gets the operator index.
static int[] getOperatorIndices(String[] opNames)
          For a given list of operator names, returns the list of their corresponding indices.
static int getOperatorKind(int index)
          Given the index of an operator, tells whether it's a binary operator (rather than a unary).
static String getOperatorName(int index)
          Given the index of an operator, gets its name.
static int getOperatorType(int index)
          Given the index of an operator, gets its type.
static boolean isValidOperator(int index)
          Tells whether the specified operator is valid.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ROP_EQUAL

public static final String ROP_EQUAL
The relational equality operator ('=' in SQL).

ROP_LESS

public static final String ROP_LESS
The relational 'less than' operator ('<' in SQL).

ROP_LEQ

public static final String ROP_LEQ
The relational 'less than or equal to' operator ('<=' in SQL).

ROP_GREATER

public static final String ROP_GREATER
The relational 'greater than' operator ('>' in SQL).

ROP_GEQ

public static final String ROP_GEQ
The relational 'greater than or equal to' operator ('>=' in SQL).

SOP_LIKE

public static final String SOP_LIKE
The 'like' string operator ('LIKE' in SQL).

SOP_LIKE_IGNORE_CASE

public static final String SOP_LIKE_IGNORE_CASE
The 'like-ignore-case' string operator ('LIKE' in SQL, but executed in a case-insensitive fashion, e.g. (LCASE("Customer"."FirstName") LIKE LCASE('Susan'))).

SOP_STARTS_WITH

public static final String SOP_STARTS_WITH
The 'startsWith' string operator (equivalent to, for example, LIKE 'foo%' in SQL).

SOP_ENDS_WITH

public static final String SOP_ENDS_WITH
The 'endsWith' string operator (equivalent to, for example, LIKE '%bar' in SQL).

SOP_EQUALS_IGNORE_CASE

public static final String SOP_EQUALS_IGNORE_CASE
The 'equalsIgnoreCase' string operator (in SQL, equivalent to, for example, (LCASE("Customer"."FirstName") = LCASE('Susan'))).

OP_IN

public static final String OP_IN
The 'in' operator (equivalent to 'IN' in SQL).

OP_BETWEEN

public static final String OP_BETWEEN
The 'between' operator (equivalent to 'BETWEEN' in SQL).

OP_IS_NULL

public static final String OP_IS_NULL
The 'isNull' operator (equivalent to the 'IS NULL' condition in SQL).

IDX_ROP_EQUAL

public static final int IDX_ROP_EQUAL
The index of the equality operator.

IDX_ROP_LESS

public static final int IDX_ROP_LESS
The index of the 'less than' operator.

IDX_ROP_LEQ

public static final int IDX_ROP_LEQ
The index of the 'less than or equal to' operator.

IDX_ROP_GREATER

public static final int IDX_ROP_GREATER
The index of the 'greater than' operator.

IDX_ROP_GEQ

public static final int IDX_ROP_GEQ
The index of the 'greater than or equal to' operator.

IDX_SOP_LIKE

public static final int IDX_SOP_LIKE
The index of the 'like' operator.

IDX_SOP_LIKE_IGNORE_CASE

public static final int IDX_SOP_LIKE_IGNORE_CASE
The index of the 'like-ignore-case' operator.

IDX_SOP_STARTS_WITH

public static final int IDX_SOP_STARTS_WITH
The index of the 'starts with' operator.

IDX_SOP_ENDS_WITH

public static final int IDX_SOP_ENDS_WITH
The index of the 'ends with' operator.

IDX_SOP_EQUALS_IGNORE_CASE

public static final int IDX_SOP_EQUALS_IGNORE_CASE
The index of the 'equals-ignore-case' operator.

IDX_OP_IN

public static final int IDX_OP_IN
The index of the 'in' operator.

IDX_OP_BETWEEN

public static final int IDX_OP_BETWEEN
The index of the 'between' operator.

IDX_OP_IS_NULL

public static final int IDX_OP_IS_NULL
The index of the 'is null' operator.

OP_TYPE_STR

public static final int OP_TYPE_STR
The operator type of 'string operators'.

OP_TYPE_REL

public static final int OP_TYPE_REL
The operator type of 'relational operators'.

OP_TYPE_OTHER

public static final int OP_TYPE_OTHER
The operator type of 'other operators'.

ALL_OP_TYPES

public static final int ALL_OP_TYPES
The concatenated value for all the operator types.

OP_TYPE_INVALID

public static final int OP_TYPE_INVALID
The value to indicate an invalid operator type.

OP_KIND_UNARY

public static final int OP_KIND_UNARY
The operator kind of "unary" (an operator that works on one operand). See also EbiOperatorDescriptor.getOperatorKind

OP_KIND_BINARY

public static final int OP_KIND_BINARY
The operator kind of "binary" (an operator that works on two operands). See also EbiOperatorDescriptor.getOperatorKind

OP_KIND_TERNARY

public static final int OP_KIND_TERNARY
The operator kind of "ternary" (an operator that works on three operands). See also EbiOperatorDescriptor.getOperatorKind

OP_KIND_NARY

public static final int OP_KIND_NARY
The operator kind of "n-ary" (an operator that works on N number of operands). See also EbiOperatorDescriptor.getOperatorKind

OP_KIND_INVALID

public static final int OP_KIND_INVALID
The value to indicate an invalid operator kind.

SORT_BY_OP_NAME

public static final int SORT_BY_OP_NAME
Sort mode of "sort by operator name". Usage: in getOperatorDescriptors.

SORT_BY_OP_DISPLAY_NAME

public static final int SORT_BY_OP_DISPLAY_NAME
Sort mode of "sort by operator display name". Usage: in getOperatorDescriptors.

SORT_BY_OP_INDEX

public static final int SORT_BY_OP_INDEX
Sort mode of "sort by operator index". Usage: in getOperatorDescriptors.

SORT_BY_OP_TYPE

public static final int SORT_BY_OP_TYPE
Sort mode of "sort by operator type". Usage: in getOperatorDescriptors. See also: OP_TYPE_STR, OP_TYPE_REL, OP_TYPE_OTHER

SORT_BY_OP_KIND

public static final int SORT_BY_OP_KIND
Sort mode of "sort by operator kind". Usage: in getOperatorDescriptors. See also: OP_KIND_BINARY, OP_KIND_UNARY...
Constructor Detail

EboDocQueryOpUtil

public EboDocQueryOpUtil()
Method Detail

getOperatorName

public static String getOperatorName(int index)
Given the index of an operator, gets its name.
Parameters:
index - the index
Returns:
the operator name

isValidOperator

public static boolean isValidOperator(int index)
Tells whether the specified operator is valid.
Parameters:
index - the index
Returns:
true if the operator is valid, false otherwise

getOperatorIndex

public static int getOperatorIndex(String opName)
Given the operator name, gets the operator index.
Parameters:
opName - the name of the operator
Returns:
the operator index; -1 if the specified property name is invalid

getOperatorType

public static int getOperatorType(int index)
Given the index of an operator, gets its type.
Parameters:
index - the index of the operator
Returns:
the operator type

getOperatorDisplayName

public static String getOperatorDisplayName(int index,
                                            Locale locale)
Given the index of an operator, gets a user-friendly, displayable string describing the operator.
Parameters:
index - the operator index
locale - the locale; if null, then the default locale is used
Returns:
displayable string describing the operator

getOperatorIndices

public static int[] getOperatorIndices(String[] opNames)
For a given list of operator names, returns the list of their corresponding indices.
Parameters:
opNames - the operator names
Returns:
the list of operator indices

getOperatorDescriptor

public static EbiOperatorDescriptor getOperatorDescriptor(int index,
                                                          Locale locale)
Given the index of an operator, returns the Operator Descriptor.
Parameters:
index - the operator index
locale - the locale to use; if null, the default locale is used
Returns:
the Operator Descriptor for the operator, or null if the index is invalid

getOperatorDescriptors

public static Collection getOperatorDescriptors(Locale locale)
Gets a collection of Operator Descriptors for all the available operators. The returned Descriptors are sorted by the operator name.
Parameters:
locale - the locale to use
Returns:
collection of Operator Descriptors for all the available operators

getOperatorDescriptors

public static Collection getOperatorDescriptors(Locale locale,
                                                int sortBy)
Gets a collection of Operator Descriptors for all the available operators, in a sorted fashion.
Parameters:
locale - the locale to use
sortBy - the sort mode
Returns:
collection of Operator Descriptors for all the available operators

getOperatorDescriptors

public static Collection getOperatorDescriptors(int opTypes,
                                                Locale locale,
                                                int sortBy,
                                                int[] exclusions)
Gets a collection of Operator Descriptors for all the available operators, in a sorted fashion, with an option to filter out some specific operators.
Parameters:
locale - the locale to use
sortBy - the sort mode
exclusions - the indices of operators to exclude from the returned list, if any
Returns:
collection of Operator Descriptors for all the available operators (minus any exclusions)

getOperatorCount

public static int getOperatorCount()
Gets the number of the available operators.
Returns:
the number of the available operators

getOperatorKind

public static int getOperatorKind(int index)
Given the index of an operator, tells whether it's a binary operator (rather than a unary).
Parameters:
index - the operator index
Returns:
true if it's a binary operator, false otherwise

Novell exteNd
Director 5.2 API