Modifier and Type | Method and Description |
---|---|
Comparison |
comparison(QueryObjectModelFactory factory,
DynamicOperand left,
StaticOperand right)
Returns a comparison between the given operands using this operator.
|
java.lang.String |
formatSql(java.lang.String a,
java.lang.String b)
Formats an SQL constraint with this operator and the given operands.
|
java.lang.String |
formatXpath(java.lang.String a,
java.lang.String b)
Formats an XPath constraint with this operator and the given operands.
|
static java.lang.String[] |
getAllQueryOperators()
Returns an array of the names of all the JCR 2.0 query operators.
|
static Operator |
getOperatorByName(java.lang.String name)
Returns the operator with the given JCR name.
|
java.lang.String |
toString()
Returns the JCR 2.0 name of this query operator.
|
static Operator |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static Operator[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Operator EQ
public static final Operator NE
public static final Operator GT
public static final Operator GE
public static final Operator LT
public static final Operator LE
public static final Operator LIKE
public static Operator[] values()
for (Operator c : Operator.values()) System.out.println(c);
public static Operator valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic Comparison comparison(QueryObjectModelFactory factory, DynamicOperand left, StaticOperand right) throws RepositoryException
factory
- factory for creating the comparisonleft
- operand on the left hand sideright
- operand on the right hand sideRepositoryException
- if the comparison can not be createdpublic java.lang.String formatXpath(java.lang.String a, java.lang.String b)
a
- first operandb
- second operanda op b
or
jcr:like(a, b)
for LIKE
public java.lang.String formatSql(java.lang.String a, java.lang.String b)
a
- first operandb
- second operanda op b
public java.lang.String toString()
toString
in class java.lang.Enum<Operator>
QueryObjectModelConstants
public static java.lang.String[] getAllQueryOperators()
public static Operator getOperatorByName(java.lang.String name) throws RepositoryException
name
- JCR name of an operatorRepositoryException
- if the given name is unknownCopyright © 2010 - 2020 Adobe. All Rights Reserved