001package org.kuali.ole.conversion; 002 003import org.apache.ojb.broker.accesslayer.conversions.ConversionException; 004import org.apache.ojb.broker.accesslayer.conversions.FieldConversion; 005 006/** 007 * Created with IntelliJ IDEA. 008 * User: vivekb 009 * Date: 4/11/14 010 * Time: 4:53 PM 011 * To change this template use File | Settings | File Templates. 012 */ 013public class OLEPrefixConversion implements FieldConversion { 014 @Override 015 public Object javaToSql(Object source) throws ConversionException { 016 if (source instanceof String && ((String) source).contains("who")) { 017 return ((String) source).substring(4); 018 } 019 return source; 020 } 021 022 @Override 023 public Object sqlToJava(Object source) throws ConversionException { 024 return source; 025 } 026}