public class ValueDecorator extends Object implements ValueMaker
| Modifier and Type | Class and Description |
|---|---|
static interface |
ValueDecorator.ValueConstraint |
NULL| Constructor and Description |
|---|
ValueDecorator(ValueMaker base,
List<ValueDecorator.ValueConstraint> constraints) |
ValueDecorator(ValueMaker base,
List<ValueDecorator.ValueConstraint> constraints,
Translator translator) |
| Modifier and Type | Method and Description |
|---|---|
static ValueDecorator.ValueConstraint |
containsConstraint(String containsSubstring) |
void |
describeSelf(NodeSetFilter c) |
String |
makeValue(ResultRow row)
Retrieves a value from a database row according to some rule or pattern.
|
static ValueDecorator.ValueConstraint |
maxLengthConstraint(int maxLength) |
List<OrderSpec> |
orderSpecs(boolean ascending) |
Set<ProjectionSpec> |
projectionSpecs()
Returns a set of all
ProjectionSpecs containing data necessary
for this ValueSource. |
static ValueDecorator.ValueConstraint |
regexConstraint(String regex) |
ValueMaker |
renameAttributes(ColumnRenamer renamer) |
String |
toString() |
Expression |
valueExpression(String value)
A SQL expression that selects only rows where this value maker
produces the specified value.
|
public ValueDecorator(ValueMaker base, List<ValueDecorator.ValueConstraint> constraints)
public ValueDecorator(ValueMaker base, List<ValueDecorator.ValueConstraint> constraints, Translator translator)
public static ValueDecorator.ValueConstraint maxLengthConstraint(int maxLength)
public static ValueDecorator.ValueConstraint containsConstraint(String containsSubstring)
public static ValueDecorator.ValueConstraint regexConstraint(String regex)
public String makeValue(ResultRow row)
ValueMakermakeValue in interface ValueMakerrow - the database rowpublic void describeSelf(NodeSetFilter c)
describeSelf in interface ValueMakerpublic Expression valueExpression(String value)
ValueMakerExpression.FALSE if this
value maker is incapable of producing the value.valueExpression in interface ValueMakervalue - A valuepublic Set<ProjectionSpec> projectionSpecs()
ValueMakerProjectionSpecs containing data necessary
for this ValueSource.projectionSpecs in interface ValueMakerProjectionSpecspublic ValueMaker renameAttributes(ColumnRenamer renamer)
renameAttributes in interface ValueMakerpublic List<OrderSpec> orderSpecs(boolean ascending)
orderSpecs in interface ValueMaker