|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A data type is a definition of a domain-specific type based on one of a few built-in types (such as string, long, date, ...) and can be augmented with metadata (prompt, title, default value, ...), validation rules and formatting patterns.
Method Summary | |
void |
bind(java.sql.PreparedStatement statement,
int pos,
java.lang.Object value)
Bind a value of this type to a JDBC PreparedStatement at the given position. |
java.lang.Object |
convert(java.lang.Object object)
Checks that the given object is of the kind that this Type expects. |
java.lang.Object |
fetch(java.sql.ResultSet resultSet,
java.lang.String fieldName)
Gets a value from a ResultSet using the appropriate methods according to the data type. |
java.lang.String |
format(java.lang.Object value,
ResourceHandle resourceHandle,
FormatCache formatCache)
Creates a string representation of the value, based on the locale. |
java.lang.String |
formatRaw(java.lang.Object value)
Formats the value using US Locale rules. |
void |
generateInputInfoSaxFragment(org.xml.sax.ContentHandler contentHandler,
ExecutionContext executionContext,
ResourceHandle resourceHandle)
Generates a piece of SAX representing this data type. |
void |
generateOutputInfoSaxFragment(org.xml.sax.ContentHandler contentHandler,
ResourceHandle resourceHandle)
Generates a piece of SAX containing certain information about the datatype. |
java.lang.String |
getDefaultValue(ExecutionContext executionContext,
ResourceHandle resourceHandle)
Determines the default value for this data type. |
Operator |
getOperatorById(java.lang.String id)
Retrieves the operator with the specified id. |
java.lang.String |
getTitle(ResourceHandle resourceHandle)
|
java.lang.String |
getTypeName()
Returns a name identifying the underlying built-in type. |
ValidationResult |
validate(java.lang.String value,
ExecutionContext executionContext)
Same as validate(value, executionContext, false); |
ValidationResult |
validate(java.lang.String value,
ExecutionContext executionContext,
boolean rawLocale)
Validates the given value. |
Methods inherited from interface org.apache.avalon.framework.configuration.Configurable |
configure |
Method Detail |
public void generateInputInfoSaxFragment(org.xml.sax.ContentHandler contentHandler, ExecutionContext executionContext, ResourceHandle resourceHandle) throws java.lang.Exception
The generated output will contain everything about the datatype, includes selection lists etc, thus
everything needed for inputing values of this datatype. If you only need some output metadata, use
generateOutputInfoSaxFragment(org.xml.sax.ContentHandler, org.outerj.xreporter.resource.ResourceHandle)
.
java.lang.Exception
public void generateOutputInfoSaxFragment(org.xml.sax.ContentHandler contentHandler, ResourceHandle resourceHandle) throws org.xml.sax.SAXException
generateInputInfoSaxFragment(org.xml.sax.ContentHandler, org.outerj.xreporter.report.definition.ExecutionContext, org.outerj.xreporter.resource.ResourceHandle)
org.xml.sax.SAXException
public ValidationResult validate(java.lang.String value, ExecutionContext executionContext)
public ValidationResult validate(java.lang.String value, ExecutionContext executionContext, boolean rawLocale)
rawLocale
- ignore the user locale for parsing values and use the built-in default localepublic java.lang.String format(java.lang.Object value, ResourceHandle resourceHandle, FormatCache formatCache)
formatCache
- optional parameter, can be null. See FormatCache
for more info.public java.lang.String formatRaw(java.lang.Object value)
public Operator getOperatorById(java.lang.String id)
public void bind(java.sql.PreparedStatement statement, int pos, java.lang.Object value) throws java.sql.SQLException
value
- an object of the correct type, depending on the base type of this data type.
java.sql.SQLException
public java.lang.Object fetch(java.sql.ResultSet resultSet, java.lang.String fieldName) throws java.sql.SQLException
ResultSet
using the appropriate methods according to the data type.
java.sql.SQLException
public java.lang.String getTitle(ResourceHandle resourceHandle)
public java.lang.String getDefaultValue(ExecutionContext executionContext, ResourceHandle resourceHandle)
public java.lang.Object convert(java.lang.Object object) throws UnconvertibleException
UnconvertibleException
public java.lang.String getTypeName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |