|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.d2rq.values.SQLExpressionValueMaker
public class SQLExpressionValueMaker
A value maker that creates its values from a SQL expression. TODO Write unit tests
Field Summary |
---|
Fields inherited from interface org.d2rq.values.ValueMaker |
---|
NULL |
Constructor Summary | |
---|---|
SQLExpressionValueMaker(Expression expression,
Vendor vendor)
|
Method Summary | |
---|---|
void |
describeSelf(NodeSetFilter c)
|
boolean |
equals(Object other)
|
int |
hashCode()
|
String |
makeValue(ResultRow row)
Retrieves a value from a database row according to some rule or pattern. |
boolean |
matches(String value)
Indicates whether the node maker is capable of producing a given value, as far as can be told without having access to the actual database. |
List<OrderOp.OrderSpec> |
orderSpecs(boolean ascending)
|
Set<ProjectionSpec> |
projectionSpecs()
Returns a set of all ProjectionSpec s containing data necessary
for this ValueSource. |
ValueMaker |
rename(Renamer renamer)
|
String |
toString()
|
Expression |
valueExpression(String value,
DatabaseOp table,
Vendor vendor)
A SQL expression that selects only rows where this value maker produces the specified value. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SQLExpressionValueMaker(Expression expression, Vendor vendor)
Method Detail |
---|
public void describeSelf(NodeSetFilter c)
describeSelf
in interface ValueMaker
public Set<ProjectionSpec> projectionSpecs()
ValueMaker
ProjectionSpec
s containing data necessary
for this ValueSource.
projectionSpecs
in interface ValueMaker
ProjectionSpec
spublic String makeValue(ResultRow row)
ValueMaker
makeValue
in interface ValueMaker
row
- the database row
public boolean matches(String value)
ValueMaker
matches
in interface ValueMaker
true
iff this node maker is capable of producing the valuepublic Expression valueExpression(String value, DatabaseOp table, Vendor vendor)
ValueMaker
Expression.FALSE
if this
value maker is incapable of producing the value.
valueExpression
in interface ValueMaker
value
- A valuetable
- The table to which the expression will be applicablevendor
- A vendor instance for datatyping etc.
public ValueMaker rename(Renamer renamer)
rename
in interface ValueMaker
public List<OrderOp.OrderSpec> orderSpecs(boolean ascending)
orderSpecs
in interface ValueMaker
public int hashCode()
hashCode
in class Object
public boolean equals(Object other)
equals
in class Object
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |