|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.endeca.navigation.analytics.Select
public class Select
A Select
operation represents the assignment of a named
derived value to a record produced as the result of a Statement
.
The definition of the derived value is given by an expression.
Constructor Summary | |
---|---|
Select(String field,
Expr expr)
Constructs a new Select which will associate
the result of expr with the derived property
named field . |
Method Summary | |
---|---|
Expr |
getExpr()
Gets the derived property expression for this Select . |
String |
getFieldName()
Gets the name of the derived property that this Select
should produce. |
void |
setExpr(Expr expr)
Sets the derived property expression for this Select . |
void |
setFieldName(String name)
Sets the name of the derived property that this Select
should produce. |
String |
toString()
Returns the string form of this Select . |
String |
toWire()
Returns the wire format of this Select . |
void |
validateSyntax()
Validates the syntax of this Select . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Select(String field, Expr expr)
Select
which will associate
the result of expr
with the derived property
named field
.
field
- the name of the derived property.expr
- an expression object of type Expr
.Method Detail |
---|
public void setFieldName(String name)
Select
should produce.
name
- the name of the derived property.public String getFieldName()
Select
should produce.
public void setExpr(Expr expr)
Select
.
expr
- an expression object of type Expr
.public Expr getExpr()
Select
.
Expr
.public String toString()
Select
. These are of the format:
expression AS derived-prop-nameFor example:
AVG(Amount) / MAX(Amount) AS AvgOverMax
is returned if the derived property name is "AvgOverMax" and the
expression assigns the ratio of the average "Amount" value to the
maximum "Amount" value.
toString
in interface QueryNode
toString
in class Object
Select
in the specified format.public String toWire()
Select
. This method is not
intended for public use because the wire format is subject to change.
toWire
in interface QueryNode
Select
.public void validateSyntax() throws SyntaxException
Select
.
A Select
is valid if the derived property name
is non-null and non-empty and the expression is itself valid.
validateSyntax
in interface QueryNode
SyntaxException
- if the syntax requirements are not satisfied.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |