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
ProjectionSpecs 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 ValueMakerpublic boolean matches(String value)
public 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 String makeValue(ResultRow row)
makeValue in interface ValueMakerrow - a database rowpublic List<OrderSpec> orderSpecs(boolean ascending)
orderSpecs in interface ValueMakerpublic boolean isEquivalentTo(Pattern p)
true if the pattern is identical or differs only in
the column namespublic ValueMaker renameAttributes(ColumnRenamer renames)
renameAttributes in interface ValueMakerpublic Expression toExpression()
public boolean usesColumnFunctions()