public class Pattern extends Object implements ValueMaker
Modifier and Type | Class and Description |
---|---|
static class |
Pattern.EncodeFunction |
Modifier and Type | Field and Description |
---|---|
static String |
DELIMITER |
NULL
Constructor and Description |
---|
Pattern(String pattern)
Constructs a new Pattern instance from a pattern syntax string
|
Modifier and Type | Method and Description |
---|---|
List<Attribute> |
attributes() |
void |
describeSelf(NodeSetFilter c) |
boolean |
equals(Object otherObject) |
String |
firstLiteralPart() |
int |
hashCode() |
boolean |
isEquivalentTo(Pattern p) |
String |
lastLiteralPart() |
boolean |
literalPartsMatchRegex(String regex) |
String |
makeValue(ResultRow row)
Constructs a String from the pattern using the given database row.
|
boolean |
matches(String value) |
List<OrderSpec> |
orderSpecs(boolean ascending) |
Iterator<Object> |
partsIterator() |
Set<ProjectionSpec> |
projectionSpecs()
Returns a set of all
ProjectionSpec s containing data necessary
for this ValueSource. |
ValueMaker |
renameAttributes(ColumnRenamer renames) |
Expression |
toExpression() |
String |
toString() |
boolean |
usesColumnFunctions() |
Expression |
valueExpression(String value)
A SQL expression that selects only rows where this value maker
produces the specified value.
|
public static final String DELIMITER
public Pattern(String pattern)
pattern
- a pattern syntax stringD2RQException
- on malformed patternpublic String firstLiteralPart()
public String lastLiteralPart()
public boolean literalPartsMatchRegex(String regex)
public void describeSelf(NodeSetFilter c)
describeSelf
in interface ValueMaker
public boolean matches(String value)
public Expression valueExpression(String value)
ValueMaker
Expression.FALSE
if this
value maker is incapable of producing the value.valueExpression
in interface ValueMaker
value
- A valuepublic Set<ProjectionSpec> projectionSpecs()
ValueMaker
ProjectionSpec
s containing data necessary
for this ValueSource.projectionSpecs
in interface ValueMaker
ProjectionSpec
spublic String makeValue(ResultRow row)
makeValue
in interface ValueMaker
row
- a database rowpublic List<OrderSpec> orderSpecs(boolean ascending)
orderSpecs
in interface ValueMaker
public boolean isEquivalentTo(Pattern p)
true
if the pattern is identical or differs only in
the column namespublic ValueMaker renameAttributes(ColumnRenamer renames)
renameAttributes
in interface ValueMaker
public Expression toExpression()
public boolean usesColumnFunctions()