|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.outerj.xreporter.datatype.type.Type
Abstract base class for data types. The difference between this class and
DataType
/DataTypeImpl
is that implementations of this class provide functionality for specific types
of data (strings, numbers, dates, ...), while DataType handles the metadata around them
(prompt, title, info) and delegates type-specific matters to implementations of Type.
Field Summary | |
protected ExpressionManager |
expressionManager
|
protected LocaleMap |
formattingPatterns
Locale-specific strings that represent patterns used to format (or parse) the data. |
protected java.util.ArrayList |
validationRules
List of ValidationRules |
Constructor Summary | |
Type()
|
Method Summary | |
protected void |
addExpressionValidationRule(org.apache.avalon.framework.configuration.Configuration conf)
|
void |
addValidationRule(ValidationRule validationRule)
|
abstract void |
bind(java.sql.PreparedStatement statement,
int pos,
java.lang.Object value)
Binds a value of this type to a PreparedStatement . |
void |
compose(org.apache.avalon.framework.component.ComponentManager componentManager)
|
protected void |
configureFormattingPatterns(org.apache.avalon.framework.configuration.Configuration configuration)
This method is a service to implementations of Type that which to use formatting-patterns. |
abstract java.lang.Object |
convert(java.lang.Object object)
|
abstract java.lang.Object |
fetch(java.sql.ResultSet resultSet,
java.lang.String fieldName)
See DataType.fetch |
abstract java.lang.String |
format(java.lang.Object value,
ResourceHandle resourceHandle,
FormatCache formatCache)
See DataType.format |
abstract java.lang.String |
formatRaw(java.lang.Object value)
Format a value as simple as possible. |
abstract java.util.List |
getAllowedOperators()
Returns a list of Operator s supported by this datatype. |
abstract java.lang.String |
getName()
Returns a name that identifies this type |
abstract Operator |
getOperatorById(java.lang.String id)
|
abstract java.lang.Object |
parseRawValue(java.lang.String value)
Parses a value that was serialized using formatRaw(java.lang.Object) . |
abstract ValidationResult |
validate(java.lang.String value,
ExecutionContext executionContext)
See DataType.validate |
abstract ValidationResult |
validate(java.lang.String value,
ExecutionContext executionContext,
boolean rawLocale)
|
java.lang.String |
validateValue(java.lang.Object value,
ExecutionContext executionContext)
Validates according to the configured validation rules. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.avalon.framework.configuration.Configurable |
configure |
Field Detail |
protected LocaleMap formattingPatterns
protected java.util.ArrayList validationRules
protected ExpressionManager expressionManager
Constructor Detail |
public Type()
Method Detail |
public abstract java.util.List getAllowedOperators()
Operator
s supported by this datatype.
public abstract ValidationResult validate(java.lang.String value, ExecutionContext executionContext)
DataType.validate
public abstract ValidationResult validate(java.lang.String value, ExecutionContext executionContext, boolean rawLocale)
public abstract java.lang.String format(java.lang.Object value, ResourceHandle resourceHandle, FormatCache formatCache)
DataType.format
public abstract Operator getOperatorById(java.lang.String id)
public abstract void bind(java.sql.PreparedStatement statement, int pos, java.lang.Object value) throws java.sql.SQLException
PreparedStatement
.
java.sql.SQLException
public abstract java.lang.Object fetch(java.sql.ResultSet resultSet, java.lang.String fieldName) throws java.sql.SQLException
DataType.fetch
java.sql.SQLException
protected void configureFormattingPatterns(org.apache.avalon.framework.configuration.Configuration configuration) throws org.apache.avalon.framework.configuration.ConfigurationException
org.apache.avalon.framework.configuration.ConfigurationException
public abstract java.lang.Object parseRawValue(java.lang.String value) throws java.text.ParseException
formatRaw(java.lang.Object)
.
java.text.ParseException
public abstract java.lang.String formatRaw(java.lang.Object value)
public abstract java.lang.String getName()
public abstract java.lang.Object convert(java.lang.Object object) throws UnconvertibleException
UnconvertibleException
public void addValidationRule(ValidationRule validationRule)
public void compose(org.apache.avalon.framework.component.ComponentManager componentManager) throws org.apache.avalon.framework.component.ComponentException
compose
in interface org.apache.avalon.framework.component.Composable
org.apache.avalon.framework.component.ComponentException
public java.lang.String validateValue(java.lang.Object value, ExecutionContext executionContext)
validate(java.lang.String, org.outerj.xreporter.report.definition.ExecutionContext)
.
value
- a value of the correct type (e.g. String, Long, BigDecimal, Date, ...)
protected void addExpressionValidationRule(org.apache.avalon.framework.configuration.Configuration conf) throws org.apache.avalon.framework.configuration.ConfigurationException
org.apache.avalon.framework.configuration.ConfigurationException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |