|
XMOJO 5 API Docs | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.management.Query
This Query class supports construction of query object constraints. The static methods provided return query expressions that may be used in listing and enumerating MBeans. Individual constraint constructing methods allow only appropriate types as arguments. Composition of calls can construct arbitrary nestings of constraints, as the following example illustrates: QueryExp exp = Query.and(Query.gt(Query.attr("age"),Query.value(5)), Query.match(Query.attr("name"), Query.value("John")));
Field Summary | |
static int |
DIV
|
static int |
EQ
|
static int |
GE
|
static int |
GT
|
static int |
LE
|
static int |
LT
|
static int |
MINUS
|
static int |
PLUS
|
static int |
TIMES
|
Constructor Summary | |
Query()
Constructs a query object. |
Method Summary | |
static QueryExp |
and(QueryExp q1,
QueryExp q2)
Returns a query expression that is the conjunction of two other query expressions. |
static QueryExp |
anySubString(AttributeValueExp a,
StringValueExp s)
Returns a query expression that represents a matching constraint on a string argument. |
static AttributeValueExp |
attr(java.lang.String name)
Returns a new attribute expression. |
static AttributeValueExp |
attr(java.lang.String className,
java.lang.String name)
Returns a new qualified attribute expression. |
static QueryExp |
between(ValueExp v1,
ValueExp v2,
ValueExp v3)
Returns a query expression that represents the constraint that one value is between two other values. |
static AttributeValueExp |
classattr()
Returns a new class attribute expression which can be used in any Query call that expects a ValueExp. |
static ValueExp |
div(ValueExp v1,
ValueExp v2)
Returns a binary expression representing the quotient of two numeric values. |
static QueryExp |
eq(ValueExp v1,
ValueExp v2)
Returns a query expression that represents an equality constraint on two values. |
static QueryExp |
finalSubString(AttributeValueExp a,
StringValueExp s)
Returns a query expression that represents a matching constraint on a string argument. |
static QueryExp |
geq(ValueExp v1,
ValueExp v2)
Returns a query expression that represents a "greater than or equal to" constraint on two values. |
static QueryExp |
gt(ValueExp v1,
ValueExp v2)
Returns a query expression that represents a "greater than" constraint on two values. |
static QueryExp |
in(ValueExp va1,
ValueExp[] valueList)
Returns an expression constraining a value to be one of an explicit list. |
static QueryExp |
initialSubString(AttributeValueExp a,
StringValueExp s)
Returns a query expression that represents a matching constraint on a string argument. |
static QueryExp |
leq(ValueExp v1,
ValueExp v2)
Returns a query expression that represents a "less than or equal to" constraint on two values. |
static QueryExp |
lt(ValueExp v1,
ValueExp v2)
Returns a query expression that represents a "less than" constraint on two values. |
static QueryExp |
match(AttributeValueExp a,
StringValueExp s)
Returns a query expression that represents a matching constraint on a string argument. |
static ValueExp |
minus(ValueExp v1,
ValueExp v2)
Returns a binary expression representing the difference of two numeric values. |
static QueryExp |
not(QueryExp queryExp)
Returns a constraint that is the negation of its argument. |
static QueryExp |
or(QueryExp q1,
QueryExp q2)
Returns a query expression that is the disjunction of two other query expressions. |
static ValueExp |
plus(ValueExp v1,
ValueExp v2)
Returns a binary expression representing the sum of two numeric values or the concatenation of two string values. |
static ValueExp |
times(ValueExp v1,
ValueExp v2)
Returns a binary expression representing the product of two numeric values. |
static ValueExp |
value(boolean val)
Returns a boolean value expression that can be used in any Query call that expects a ValueExp. |
static ValueExp |
value(double val)
Returns a numeric value expression that can be used in any Query call that expects a ValueExp. |
static ValueExp |
value(float val)
Returns a numeric value expression that can be used in any Query call that expects a ValueExp. |
static ValueExp |
value(int val)
Returns a numeric value expression that can be used in any Query call that expects a ValueExp. |
static ValueExp |
value(long val)
Returns a numeric value expression that can be used in any Query call that expects a ValueExp. |
static ValueExp |
value(java.lang.Number val)
Returns a numeric value expression that can be used in any Query call that expects a ValueExp. |
static StringValueExp |
value(java.lang.String val)
Returns a new string expression. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int DIV
public static final int EQ
public static final int GE
public static final int GT
public static final int LE
public static final int LT
public static final int MINUS
public static final int PLUS
public static final int TIMES
Constructor Detail |
public Query()
Method Detail |
public static AttributeValueExp attr(java.lang.String name)
name
- - The name of the attribute.public static AttributeValueExp attr(java.lang.String className, java.lang.String name)
className
- - The name of the class possessing the attributename
- - The name of the attributepublic static AttributeValueExp classattr()
public static ValueExp value(int val)
val
- - An int valuepublic static ValueExp value(long val)
val
- - A long valuepublic static ValueExp value(float val)
val
- - A float valuepublic static ValueExp value(double val)
val
- - A double valuepublic static ValueExp value(boolean val)
val
- - A boolean valuepublic static ValueExp value(java.lang.Number val)
val
- - An instance of Numberpublic static StringValueExp value(java.lang.String val)
val
- - The string valuepublic static ValueExp plus(ValueExp v1, ValueExp v2)
v1
- - The first '+' operand.v2
- - The second '+' operand.public static ValueExp minus(ValueExp v1, ValueExp v2)
v1
- - The first '-' operand.v2
- - The second '-' operand.public static ValueExp times(ValueExp v1, ValueExp v2)
v1
- - The first '*' operand.v2
- - The second '*' operand.public static ValueExp div(ValueExp v1, ValueExp v2)
v1
- - The first '/' operand.v2
- - The second '/' operand.public static QueryExp gt(ValueExp v1, ValueExp v2)
v1
- - A value expressionv2
- - Another value expressionpublic static QueryExp match(AttributeValueExp a, StringValueExp s)
a
- - An attribute expressions
- - A string value expression representing a matching constraintpublic static QueryExp geq(ValueExp v1, ValueExp v2)
v1
- - A value expressionv2
- - Another value expressionpublic static QueryExp leq(ValueExp v1, ValueExp v2)
v1
- - A value expressionv2
- - Another value expressionpublic static QueryExp lt(ValueExp v1, ValueExp v2)
v1
- - A value expressionv2
- - Another value expressionpublic static QueryExp eq(ValueExp v1, ValueExp v2)
v1
- - A value expressionv2
- - Another value expressionpublic static QueryExp between(ValueExp v1, ValueExp v2, ValueExp v3)
v1
- - A value expression that is "between" v2 and v3v2
- - Value expression that represents a boundary of the constraintv3
- - Value expression that represents a boundary of the constraintpublic static QueryExp in(ValueExp va1, ValueExp[] valueList)
val
- - A value to be constrainedvalueList
- - An array of ValueExpspublic static QueryExp initialSubString(AttributeValueExp a, StringValueExp s)
a
- - An attribute expressions
- - A string value expression representing the beginning
of the string valuepublic static QueryExp anySubString(AttributeValueExp a, StringValueExp s)
a
- - An attribute expressions
- - A string value expression representing the substring.public static QueryExp finalSubString(AttributeValueExp a, StringValueExp s)
a
- - An attribute expressions
- - A string value expression representing the end of the string valuepublic static QueryExp and(QueryExp q1, QueryExp q2)
q1
- - A query expressionq2
- - Another query expressionpublic static QueryExp or(QueryExp q1, QueryExp q2)
q1
- - A query expressionq2
- - Another query expressionpublic static QueryExp not(QueryExp queryExp)
queryExp
- - The constraint to negate
|
XMOJO 5 API Docs | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |