|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The class FieldConversion declares a protocol for type and value
conversions between persistent classes attributes and counterpart objects supported by the
JDBC specification, e.g. String is supported by JDBC, so only an empty field
conversion is needed. But if the persistent class attribute is of type int[]
a
field conversion to a supported field type is needed - e.g. int[] ---> String
.
FieldConversionDefaultImpl
does not modify its input.
OJB users can use predefined implementation and can also
build their own conversions that perform arbitrary mappings.
The mapping has to defined in the OJB mapping configuration file - more see documentation.
Method Summary | |
java.lang.Object |
javaToSql(java.lang.Object source)
Convert an object of the persistent class to a counterpart object supported by the JDBC specification. |
java.lang.Object |
sqlToJava(java.lang.Object source)
Convert a JDBC object to a persistent class value. |
Method Detail |
public java.lang.Object javaToSql(java.lang.Object source) throws ConversionException
ConversionException
public java.lang.Object sqlToJava(java.lang.Object source) throws ConversionException
ConversionException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |