|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Object java.lang.Enum<Operator> org.apache.jackrabbit.oak.jcr.query.qom.Operator
public enum Operator
Enumeration of the JCR 2.0 query operators.
Enum Constant Summary | |
---|---|
EQ
|
|
GE
|
|
GT
|
|
LE
|
|
LIKE
|
|
LT
|
|
NE
|
Method Summary | |
---|---|
javax.jcr.query.qom.Comparison |
comparison(javax.jcr.query.qom.QueryObjectModelFactory factory,
javax.jcr.query.qom.DynamicOperand left,
javax.jcr.query.qom.StaticOperand right)
Returns a comparison between the given operands using this operator. |
String |
formatSql(String a,
String b)
Formats an SQL constraint with this operator and the given operands. |
String |
formatXpath(String a,
String b)
Formats an XPath constraint with this operator and the given operands. |
static String[] |
getAllQueryOperators()
Returns an array of the names of all the JCR 2.0 query operators. |
static Operator |
getOperatorByName(String name)
Returns the operator with the given JCR name. |
String |
toString()
Returns the JCR 2.0 name of this query operator. |
static Operator |
valueOf(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. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
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
Method Detail |
---|
public static Operator[] values()
for (Operator c : Operator.values()) System.out.println(c);
public static Operator valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is nullpublic javax.jcr.query.qom.Comparison comparison(javax.jcr.query.qom.QueryObjectModelFactory factory, javax.jcr.query.qom.DynamicOperand left, javax.jcr.query.qom.StaticOperand right) throws javax.jcr.RepositoryException
factory
- factory for creating the comparisonleft
- operand on the left hand sideright
- operand on the right hand side
javax.jcr.RepositoryException
- if the comparison can not be createdpublic String formatXpath(String a, String b)
a
- first operandb
- second operand
a op b
or
jcr:like(a, b)
for LIKE
public String formatSql(String a, String b)
a
- first operandb
- second operand
a op b
public String toString()
toString
in class Enum<Operator>
QueryObjectModelConstants
public static String[] getAllQueryOperators()
public static Operator getOperatorByName(String name)
name
- JCR name of an operator
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |