View Javadoc
1   package org.kuali.ole.service.impl;
2   
3   import org.kuali.ole.OLEConstants;
4   import org.kuali.ole.OLEPropertyConstants;
5   import org.kuali.ole.pojo.OleTxRecord;
6   import org.kuali.ole.service.OverlayOutputService;
7   
8   /**
9    * Created by IntelliJ IDEA.
10   * User: premkb
11   * Date: 2/22/13
12   * Time: 6:28 PM
13   * To change this template use File | Settings | File Templates.
14   */
15  public class OverlayTransactionOutputServiceImpl implements OverlayOutputService {
16  
17      @Override
18      public void setOutPutValue(String field, String value, Object object) {
19          if(object!=null && object instanceof OleTxRecord){
20              OleTxRecord oleTxRecord = (OleTxRecord) object;
21              if(field.equalsIgnoreCase(OLEConstants.OVERLAY_ITEM_VENDOR_LINEITEM_IDENTIFIER)){
22                  oleTxRecord.setVendorItemIdentifier(value);
23              }else if(field.equalsIgnoreCase(OLEPropertyConstants.ACCOUNT_NUMBER)){
24                  oleTxRecord.setAccountNumber(value);
25              }else if(field.equalsIgnoreCase(OLEPropertyConstants.CHART_CODE)){
26                  oleTxRecord.setItemChartCode(value);
27              }else if(field.equalsIgnoreCase(OLEPropertyConstants.OBJECT_CODE)){
28                  oleTxRecord.setObjectCode(value);
29              }
30          }
31      }
32      @Override
33      public void persist(Object object) throws Exception {
34          //To change body of implemented methods use File | Settings | File Templates.
35      }
36  }