| java.lang.Object org.kuali.kfs.util.OjbCharBooleanFieldInverseConversion
OjbCharBooleanFieldInverseConversion | public class OjbCharBooleanFieldInverseConversion implements FieldConversion(Code) | | This class is intended to be used for inverting all the boolean values stored in the database before loading them into the
business object and vice versa. This functionality is necessary for situations where a database table stores the opposite of the
intented boolean attribute. An example is where a given business object has a pre-defined attribute, such as "inactive", while
the user wishes to display the value as an 'active' indicator rather than an 'inactive indicator. Ideally, it would be better to
replace the field in the database with the appropriate representation of the data so we do not have to perform these confusing
conversions on data. Unfortunately, this is not always an option.
|
Method Summary | |
public Object | javaToSql(Object source) This method takes the value intended to be passed to the SQL statement and replaces that value with its inverse. | public Object | sqlToJava(Object source) This method takes the value returned from the database and replaces it with its inverse, thus FALSE becomes TRUE and vice
versa. |
javaToSql | public Object javaToSql(Object source)(Code) | | This method takes the value intended to be passed to the SQL statement and replaces that value with its inverse. Thus TRUE
becomes FALSE and vice versa.
See Also: org.apache.ojb.broker.accesslayer.conversions.FieldConversion.javaToSql(java.lang.Object) |
sqlToJava | public Object sqlToJava(Object source)(Code) | | This method takes the value returned from the database and replaces it with its inverse, thus FALSE becomes TRUE and vice
versa.
See Also: org.apache.ojb.broker.accesslayer.conversions.FieldConversion.sqlToJava(java.lang.Object) |
|
|