javax.management
Class Query

java.lang.Object
  extended byjavax.management.Query

public class Query
extends java.lang.Object

This class is a factory for constructing queries.

REVIEW: Full explanation. See the spec for now for what it's worth.


Field Summary
static int DIV
          Divide expression
static int EQ
          Equals expression
static int GE
          Greater than or equals expression
static int GT
          Greater than expression
static int LE
          Less than or equals expression
static int LT
          Less than expression
static int MINUS
          Minus expression
static int PLUS
          Plus expression
static int TIMES
          Times expression
 
Constructor Summary
Query()
          Construct a new Query
 
Method Summary
static QueryExp (src) and(QueryExp (src)  first, QueryExp (src)  second)
          And Query expression.
static QueryExp (src) anySubString(AttributeValueExp (src)  attr, StringValueExp (src)  string)
          Tests an attribute contains a string as a subset.
static AttributeValueExp (src) attr(java.lang.String value)
          An attribute expression
static AttributeValueExp (src) attr(java.lang.String className, java.lang.String value)
          An attribute expression restricted to a specific class
static QueryExp (src) between(ValueExp (src)  test, ValueExp (src)  lower, ValueExp (src)  higher)
          Tests a value is between two other values.
static AttributeValueExp (src) classattr()
          What is this?
static ValueExp (src) div(ValueExp (src)  first, ValueExp (src)  second)
          An expression that divides the first expression by the second
static QueryExp (src) eq(ValueExp (src)  first, ValueExp (src)  second)
          Equals Comparison.
static QueryExp (src) finalSubString(AttributeValueExp (src)  attr, StringValueExp (src)  string)
          Tests an attribute ends with a string as a subset.
static QueryExp (src) geq(ValueExp (src)  first, ValueExp (src)  second)
          Greater than or Equals Comparison.
static QueryExp (src) gt(ValueExp (src)  first, ValueExp (src)  second)
          Greater than.
static QueryExp (src) in(ValueExp (src)  test, ValueExp (src) [] list)
          Tests a value is in one of the listed values.
static QueryExp (src) initialSubString(AttributeValueExp (src)  attr, StringValueExp (src)  string)
          Tests an attribute starts with a string as a subset.
static QueryExp (src) leq(ValueExp (src)  first, ValueExp (src)  second)
          Less than or equal.
static QueryExp (src) lt(ValueExp (src)  first, ValueExp (src)  second)
          Less than.
static QueryExp (src) match(AttributeValueExp (src)  attr, StringValueExp (src)  string)
          Tests an attribute equals a string value.
static ValueExp (src) minus(ValueExp (src)  first, ValueExp (src)  second)
          An expression that subtracts the second expression from the first
static QueryExp (src) not(QueryExp (src)  expression)
          Not Query expression.
static QueryExp (src) or(QueryExp (src)  first, QueryExp (src)  second)
          Or Query expression.
static ValueExp (src) plus(ValueExp (src)  first, ValueExp (src)  second)
          An expression that adds the second expression to the first
static ValueExp (src) times(ValueExp (src)  first, ValueExp (src)  second)
          An expression that multiplies the first expression by the second
static ValueExp (src) value(boolean value)
          Create a boolean value expression for use in a Query.
static ValueExp (src) value(double value)
          Create a double value expression for use in a Query.
static ValueExp (src) value(float value)
          Create a float value expression for use in a Query.
static ValueExp (src) value(int value)
          Create an integer value expression for use in a Query.
static ValueExp (src) value(long value)
          Create a long value expression for use in a Query.
static ValueExp (src) value(java.lang.Number value)
          Create a number value expression for use in a Query.
static StringValueExp (src) value(java.lang.String value)
          Create a string value expression for use in a Query.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DIV

public static final int DIV
Divide expression

See Also:
Constant Field Values (src)

EQ

public static final int EQ
Equals expression

See Also:
Constant Field Values (src)

GE

public static final int GE
Greater than or equals expression

See Also:
Constant Field Values (src)

GT

public static final int GT
Greater than expression

See Also:
Constant Field Values (src)

LE

public static final int LE
Less than or equals expression

See Also:
Constant Field Values (src)

LT

public static final int LT
Less than expression

See Also:
Constant Field Values (src)

MINUS

public static final int MINUS
Minus expression

See Also:
Constant Field Values (src)

PLUS

public static final int PLUS
Plus expression

See Also:
Constant Field Values (src)

TIMES

public static final int TIMES
Times expression

See Also:
Constant Field Values (src)
Constructor Detail

Query

public Query()
Construct a new Query

Method Detail

and

public static QueryExp (src)  and(QueryExp (src)  first,
                           QueryExp (src)  second)
And Query expression. Return true only when both expressions are true.

Parameters:
first - the first expression
second - the second expression
Returns:
the expression

anySubString

public static QueryExp (src)  anySubString(AttributeValueExp (src)  attr,
                                    StringValueExp (src)  string)
Tests an attribute contains a string as a subset. Return true when this is the case, false otherwise.

Parameters:
attr - the attribute
string - the string
Returns:
the expression

attr

public static AttributeValueExp (src)  attr(java.lang.String value)
An attribute expression

Parameters:
value - the name of the attribute
Returns:
the expression

attr

public static AttributeValueExp (src)  attr(java.lang.String className,
                                     java.lang.String value)
An attribute expression restricted to a specific class

Parameters:
className - the name of the class
value - the name of the attribute
Returns:
the expression

between

public static QueryExp (src)  between(ValueExp (src)  test,
                               ValueExp (src)  lower,
                               ValueExp (src)  higher)
Tests a value is between two other values. Returns true when this is case, false otherwise.

Parameters:
test - the value to test
lower - the lower bound
higher - the higer bound
Returns:
the expression

classattr

public static AttributeValueExp (src)  classattr()
What is this?

Returns:
the expression

div

public static ValueExp (src)  div(ValueExp (src)  first,
                           ValueExp (src)  second)
An expression that divides the first expression by the second

Parameters:
first - the first expression
second - the second expression
Returns:
the expression

eq

public static QueryExp (src)  eq(ValueExp (src)  first,
                          ValueExp (src)  second)
Equals Comparison.

Parameters:
first - the first expression
second - the second expression
Returns:
true when first equals second

finalSubString

public static QueryExp (src)  finalSubString(AttributeValueExp (src)  attr,
                                      StringValueExp (src)  string)
Tests an attribute ends with a string as a subset. Return true when this is the case, false otherwise.

Parameters:
attr - the attribute
string - the string
Returns:
the expression

geq

public static QueryExp (src)  geq(ValueExp (src)  first,
                           ValueExp (src)  second)
Greater than or Equals Comparison.

Parameters:
first - the first expression
second - the second expression
Returns:
true when first >= second

gt

public static QueryExp (src)  gt(ValueExp (src)  first,
                          ValueExp (src)  second)
Greater than.

Parameters:
first - the first expression
second - the second expression
Returns:
true when first > second

in

public static QueryExp (src)  in(ValueExp (src)  test,
                          ValueExp (src) [] list)
Tests a value is in one of the listed values. Returns true when this is case, false otherwise.

Parameters:
test - the value to test
list - an array of values
Returns:
the expression

initialSubString

public static QueryExp (src)  initialSubString(AttributeValueExp (src)  attr,
                                        StringValueExp (src)  string)
Tests an attribute starts with a string as a subset. Return true when this is the case, false otherwise.

Parameters:
attr - the attribute
string - the string
Returns:
the expression

leq

public static QueryExp (src)  leq(ValueExp (src)  first,
                           ValueExp (src)  second)
Less than or equal.

Parameters:
first - the first expression
second - the second expression
Returns:
true when first <= second

lt

public static QueryExp (src)  lt(ValueExp (src)  first,
                          ValueExp (src)  second)
Less than.

Parameters:
first - the first expression
second - the second expression
Returns:
true when first < second

match

public static QueryExp (src)  match(AttributeValueExp (src)  attr,
                             StringValueExp (src)  string)
Tests an attribute equals a string value. Return true when this is the case, false otherwise.

Parameters:
attr - the attribute
string - the string
Returns:
the expression

minus

public static ValueExp (src)  minus(ValueExp (src)  first,
                             ValueExp (src)  second)
An expression that subtracts the second expression from the first

Parameters:
first - the first expression
second - the second expression
Returns:
the expression

not

public static QueryExp (src)  not(QueryExp (src)  expression)
Not Query expression. Return true only when expression is false.

Parameters:
expression - the expression to negate
Returns:
the expression

or

public static QueryExp (src)  or(QueryExp (src)  first,
                          QueryExp (src)  second)
Or Query expression. Return true when either expression is true.

Parameters:
first - the first expression
second - the second expression
Returns:
the expression

plus

public static ValueExp (src)  plus(ValueExp (src)  first,
                            ValueExp (src)  second)
An expression that adds the second expression to the first

Parameters:
first - the first expression
second - the second expression
Returns:
the expression

times

public static ValueExp (src)  times(ValueExp (src)  first,
                             ValueExp (src)  second)
An expression that multiplies the first expression by the second

Parameters:
first - the first expression
second - the second expression
Returns:
the expression

value

public static ValueExp (src)  value(boolean value)
Create a boolean value expression for use in a Query.

Returns:
the expression

value

public static ValueExp (src)  value(double value)
Create a double value expression for use in a Query.

Returns:
the expression

value

public static ValueExp (src)  value(float value)
Create a float value expression for use in a Query.

Returns:
the expression

value

public static ValueExp (src)  value(int value)
Create an integer value expression for use in a Query.

Returns:
the expression

value

public static ValueExp (src)  value(long value)
Create a long value expression for use in a Query.

Returns:
the expression

value

public static ValueExp (src)  value(java.lang.Number value)
Create a number value expression for use in a Query.

Returns:
the expression

value

public static StringValueExp (src)  value(java.lang.String value)
Create a string value expression for use in a Query.

Returns:
the expression