View Javadoc
1   package org.kuali.ole.conversion;
2   
3   import org.apache.ojb.broker.accesslayer.conversions.ConversionException;
4   import org.apache.ojb.broker.accesslayer.conversions.FieldConversion;
5   
6   /**
7    * Created with IntelliJ IDEA.
8    * User: vivekb
9    * Date: 4/11/14
10   * Time: 4:53 PM
11   * To change this template use File | Settings | File Templates.
12   */
13  public class OLEPrefixConversion implements FieldConversion {
14      @Override
15      public Object javaToSql(Object source) throws ConversionException {
16          if (source instanceof String && ((String) source).contains("who")) {
17             return ((String) source).substring(4);
18          }
19          return source;
20      }
21  
22      @Override
23      public Object sqlToJava(Object source) throws ConversionException {
24          return source;
25      }
26  }