javax.management
public class Query extends Object
Since: 1.5
| Field Summary | |
|---|---|
| static int | DIV
A code representing the {@link #div(ValueExp, ValueExp)
query to be used in serialization. |
| static int | EQ
A code representing the {@link #eq(ValueExp, ValueExp)
query to be used in serialization. |
| static int | GE
A code representing the {@link #ge(ValueExp, ValueExp)
query to be used in serialization. |
| static int | GT
A code representing the {@link #gt(ValueExp, ValueExp)
query to be used in serialization. |
| static int | LE
A code representing the {@link #le(ValueExp, ValueExp)
query to be used in serialization. |
| static int | LT
A code representing the {@link #lt(ValueExp, ValueExp)
query to be used in serialization. |
| static int | MINUS
A code representing the {@link #minus(ValueExp, ValueExp)
query to be used in serialization. |
| static int | PLUS
A code representing the {@link #plus(ValueExp, ValueExp)
query to be used in serialization. |
| static int | TIMES
A code representing the {@link #times(ValueExp, ValueExp)
query to be used in serialization. |
| Method Summary | |
|---|---|
| static QueryExp | and(QueryExp q1, QueryExp q2)
Returns a query expression formed from the conjunction
of the two supplied query expressions.
|
| static QueryExp | anySubString(AttributeValueExp attrib, StringValueExp string)
Returns a query expression which checks that an
attribute value held by the specified
{@link AttributeValueExp} contains the string
specified by the given {@link StringValueExp}.
|
| static AttributeValueExp | attr(String name)
Returns a value expression for the value of the
named attribute. |
| static AttributeValueExp | attr(String className, String name)
Returns a value expression for the value of the
named attribute from the specified class. |
| static QueryExp | between(ValueExp v1, ValueExp v2, ValueExp v3)
Returns a query expression representing the constraint
that the value, v1, lies between v2
and v3.
|
| static AttributeValueExp | classattr()
Returns a value expression which evaluates to the name of
the class of the bean when applied. |
| static ValueExp | div(ValueExp v1, ValueExp v2)
Returns a value expression which evaluates to the result of
dividing v1 by v2.
|
| static QueryExp | eq(ValueExp v1, ValueExp v2)
Returns a query expression which evaluates to the result of
comparing v1 to v2 for equality.
|
| static QueryExp | finalSubString(AttributeValueExp attrib, StringValueExp string)
Returns a query expression which checks that an
attribute value held by the specified
{@link AttributeValueExp} ends with the string
specified by the given {@link StringValueExp}.
|
| static QueryExp | geq(ValueExp v1, ValueExp v2)
Returns a query expression which evaluates to the result of
comparing v1 to v2 to see if
v1 is greater than or equal to v2.
|
| static QueryExp | gt(ValueExp v1, ValueExp v2)
Returns a query expression which evaluates to the result of
comparing v1 to v2 to see if
v1 is greater than v2.
|
| static QueryExp | in(ValueExp v, ValueExp[] vlist)
Returns a query expression representing the constraint
that the value, v, is a member of the
list, vlist.
|
| static QueryExp | initialSubString(AttributeValueExp attrib, StringValueExp string)
Returns a query expression which checks that an
attribute value held by the specified
{@link AttributeValueExp} starts with the string
specified by the given {@link StringValueExp}.
|
| static QueryExp | isInstanceOf(StringValueExp className)
Returns a query expression which checks that a
bean is an instance of the class specified
by the given {@link StringValueExp}. |
| static QueryExp | leq(ValueExp v1, ValueExp v2)
Returns a query expression which evaluates to the result of
comparing v1 to v2 to see if
v1 is less than or equal to v2.
|
| static QueryExp | lt(ValueExp v1, ValueExp v2)
Returns a query expression which evaluates to the result of
comparing v1 to v2 to see if
v1 is less than v2.
|
| static QueryExp | match(AttributeValueExp attrib, StringValueExp string) Returns a query expression which checks that an attribute value matches the pattern specified by the given {@link StringValueExp}. |
| static ValueExp | minus(ValueExp v1, ValueExp v2)
Returns a value expression which evaluates to the result of
subtracting v2 from v1.
|
| static QueryExp | not(QueryExp q)
Returns a query expression representing the negation
of the specified query expression.
|
| static QueryExp | or(QueryExp q1, QueryExp q2)
Returns a query expression formed from the disjunction
of the two supplied query expressions.
|
| static ValueExp | plus(ValueExp v1, ValueExp v2)
Returns a value expression which evaluates to the result of
adding v1 to v2.
|
| static ValueExp | times(ValueExp v1, ValueExp v2)
Returns a value expression which evaluates to the result of
multiplying v1 by v2.
|
| static ValueExp | value(boolean val)
Returns a value expression wrapping the specified value.
|
| static ValueExp | value(double val)
Returns a value expression wrapping the specified value.
|
| static ValueExp | value(float val)
Returns a value expression wrapping the specified value.
|
| static ValueExp | value(int val)
Returns a value expression wrapping the specified value.
|
| static ValueExp | value(long val)
Returns a value expression wrapping the specified value.
|
| static ValueExp | value(Number val)
Returns a value expression wrapping the specified value.
|
| static StringValueExp | value(String val)
Returns a value expression wrapping the specified string.
|
Parameters: q1 the first query expression. q2 the second query expression.
Returns: a query expression representing q1 && q2. This will be serialized as the non-public class {@link AndQueryExp}.
Parameters: attrib the attribute to match. string the substring to find.
Returns: a query expression representing
attrib.matches("*" + string + "*").
This will be serialized as the non-public class
{@link MatchQueryExp}.
Parameters: name the name of the attribute.
Returns: a value expression which returns the value of the named attribute when applied.
Parameters: className the class containing the attribute. name the name of the attribute.
Returns: a value expression which returns the value of the named attribute when applied. This will be serialized as the non-public class {@link QualifiedAttributeValueExp}.
v1, lies between v2
and v3.
Parameters: v1 the value to compare against the boundaries. v2 the lower boundary. v3 the upper boundary.
Returns: a query expression representing a comparison
of v1 against v2
and v3. It returns true if
v2 <= v1 <= v3. This
will be serialized as the non-public class
{@link BetweenQueryExp}.
Returns: a value expression which returns the class name of the bean to which it is applied. This will be serialized as the non-public class {@link ClassAttributeValueExp}.
v1 by v2.
Parameters: v1 the left-hand operand. v2 the right-hand operand.
Returns: a value expression which returns the result of the division when applied. This will be serialized as the non-public class {@link BinaryOpValueExp} with an operation of {@link #DIV}.
v1 to v2 for equality.
Parameters: v1 the left-hand operand. v2 the right-hand operand.
Returns: a value expression which returns the result of the comparison when applied. This will be serialized as the non-public class {@link BinaryRelQueryExp} with an operation of {@link #EQ}.
Parameters: attrib the attribute to match. string the substring to find.
Returns: a query expression representing
attrib.matches("*" + string).
This will be serialized as the non-public class
{@link MatchQueryExp}.
v1 to v2 to see if
v1 is greater than or equal to v2.
Parameters: v1 the left-hand operand. v2 the right-hand operand.
Returns: a value expression which returns the result of the comparison when applied. This will be serialized as the non-public class {@link BinaryRelQueryExp} with an operation of {@link #GE}.
v1 to v2 to see if
v1 is greater than v2.
Parameters: v1 the left-hand operand. v2 the right-hand operand.
Returns: a value expression which returns the result of the comparison when applied. This will be serialized as the non-public class {@link BinaryRelQueryExp} with an operation of {@link #GT}.
v, is a member of the
list, vlist.
Parameters: v the value to look for in the list. vlist the list of allowed values.
Returns: a query expression representing a membership check
of v against the list, vlist.
This will be serialized as the non-public class
{@link InQueryExp}.
Parameters: attrib the attribute to match. string the substring to find.
Returns: a query expression representing
attrib.matches(string + "*").
This will be serialized as the non-public class
{@link MatchQueryExp}.
((StringValueExp)
className.apply(objectName)).getValue() as the
class name.
Parameters: className the name of the class which the bean should be an instance of.
Returns: a query expression representing the inheritance check. This will be serialized as the non-public class {@link InstanceOfQueryExp}.
Since: 1.6
v1 to v2 to see if
v1 is less than or equal to v2.
Parameters: v1 the left-hand operand. v2 the right-hand operand.
Returns: a value expression which returns the result of the comparison when applied. This will be serialized as the non-public class {@link BinaryRelQueryExp} with an operation of {@link #LE}.
v1 to v2 to see if
v1 is less than v2.
Parameters: v1 the left-hand operand. v2 the right-hand operand.
Returns: a value expression which returns the result of the comparison when applied. This will be serialized as the non-public class {@link BinaryRelQueryExp} with an operation of {@link #LT}.
Returns a query expression which checks that an attribute value matches the pattern specified by the given {@link StringValueExp}. The pattern uses file-globbing syntax:
Parameters: attrib the attribute to match. string the substring to find.
Returns: a query expression representing the result of matching the pattern against the evaluated value of the attribute. This will be serialized as the non-public class {@link MatchQueryExp}.
v2 from v1.
Parameters: v1 the left-hand operand. v2 the right-hand operand.
Returns: a value expression which returns the result of the subtraction when applied. This will be serialized as the non-public class {@link BinaryOpValueExp} with an operation of {@link #MINUS}.
Parameters: q the query to negate.
Returns: a query expression representing the negation of
q. This will be serialized as the
non-public class {@link NotQueryExp}.
Parameters: q1 the first query expression. q2 the second query expression.
Returns: a query expression representing q1 || q2. This will be serialized as the non-public class {@link OrQueryExp}.
v1 to v2.
Parameters: v1 the left-hand operand. v2 the right-hand operand.
Returns: a value expression which returns the result of the addition when applied. This will be serialized as the non-public class {@link BinaryOpValueExp} with an operation of {@link #PLUS}.
v1 by v2.
Parameters: v1 the left-hand operand. v2 the right-hand operand.
Returns: a value expression which returns the result of the multiplication when applied. This will be serialized as the non-public class {@link BinaryOpValueExp} with an operation of {@link #TIMES}.
Parameters: val the boolean value to wrap.
Returns: a value expression wrapping val. This
will be serialized as the non-public class
{@link BooleanValueExp}.
Parameters: val the double value to wrap.
Returns: a value expression wrapping val. This
will be serialized as the non-public class
{@link NumericValueExp}.
Parameters: val the float value to wrap.
Returns: a value expression wrapping val. This
will be serialized as the non-public class
{@link NumericValueExp}.
Parameters: val the integer value to wrap.
Returns: a value expression wrapping val. This
will be serialized as the non-public class
{@link NumericValueExp}.
Parameters: val the long value to wrap.
Returns: a value expression wrapping val. This
will be serialized as the non-public class
{@link NumericValueExp}.
Parameters: val the {@link Number} value to wrap.
Returns: a value expression wrapping val. This
will be serialized as the non-public class
{@link NumericValueExp}.
Parameters: val the {@link String} to wrap.
Returns: a {@link StringValueExp} wrapping val.