public enum Operator extends Enum<Operator>
Modifier and Type | Method and Description |
---|---|
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.
|
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(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- 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 sidejavax.jcr.RepositoryException
- if the comparison can not be createdpublic String formatXpath(String a, String b)
a
- first operandb
- second operanda op b
or
jcr:like(a, b)
for LIKE
public String formatSql(String a, String b)
a
- first operandb
- second operanda op b
public String toString()
public static String[] getAllQueryOperators()
public static Operator getOperatorByName(String name) throws javax.jcr.RepositoryException
name
- JCR name of an operatorjavax.jcr.RepositoryException
- if the given name is unknownCopyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.