public class PropertyFilterFormatter extends java.lang.Object implements Formatter<PropertyFilter>
PropertyFilter.toString()
method. It knows
about some special properties and load the names of annotation types, item subtypes, etc
instead of just displaying their ID values.Modifier and Type | Field and Description |
---|---|
private Formatter<java.util.Date> |
dateFormatter |
private DbControl |
dc |
Constructor and Description |
---|
PropertyFilterFormatter(DbControl dc,
Formatter<java.util.Date> dateFormatter)
Create a new formatter.
|
Modifier and Type | Method and Description |
---|---|
private void |
appendListOfValues(java.lang.StringBuilder sb,
java.lang.String value,
java.lang.String quote) |
java.lang.String |
format(PropertyFilter filter)
Format a value by converting it to a string.
|
private java.lang.String |
nameOfItem(DbControl dc,
Item itemType,
int id,
boolean quote) |
PropertyFilter |
parseString(java.lang.String value)
Parse a string and return a value of the correct type.
|
private final DbControl dc
private final Formatter<java.util.Date> dateFormatter
public java.lang.String format(PropertyFilter filter)
Formatter
format
in interface Formatter<PropertyFilter>
filter
- The value to formatpublic PropertyFilter parseString(java.lang.String value)
Formatter
parseString
in interface Formatter<PropertyFilter>
value
- The string to parsejava.lang.UnsupportedOperationException
- Alwaysprivate void appendListOfValues(java.lang.StringBuilder sb, java.lang.String value, java.lang.String quote)