org.apache.tuscany.das.rdb
Interface Converter

All Known Implementing Classes:
DefaultConverter

public interface Converter

A lightweight Table-column <--> DataObject-property converter framework. Converters allow a user to insert a transformation between a column value and is destination DataObject property value. For example, by default, a VARCHAR column will be represented as a String in its corresponding DataObject property. A user could insert a converter that transforms the the VARCHAR value to an Integer. If this is done then although the column returns character data, the DataObject property will be an Integer


Method Summary
 java.lang.Object getColumnValue(java.lang.Object propertyData)
          Transform the columnData object to a new value and possibly new type.
 java.lang.Object getPropertyValue(java.lang.Object columnData)
          Transform the columnData object to a new value and possibly new type.
 

Method Detail

getPropertyValue

java.lang.Object getPropertyValue(java.lang.Object columnData)
Transform the columnData object to a new value and possibly new type. This should be the invers operation of #getColumnValue

Parameters:
columnData - The column value to transorm
Returns:
Returns the transformed value

getColumnValue

java.lang.Object getColumnValue(java.lang.Object propertyData)
Transform the columnData object to a new value and possibly new type. This should be the invers operation of #getPropertyValue

Parameters:
propertyData - The property value to transform
Returns:
Returns the transformed value


Copyright © 2007 Apache Software Foundation. All Rights Reserved.