Java tutorial
/** * PureInfo Command * @(#)GetAmmountOfOutlayRef.java 1.0 2007-1-9 * * Copyright(c) 2004-2005, PureInfo Information Technology Corp. Ltd. * All rights reserved, see the license file. * * www.pureinfo.com.cn */ package com.pureinfo.studio.db.cmd2srm.ref.impl; import org.apache.commons.lang.StringUtils; import com.pureinfo.dolphin.mapping.EntityMetadata; import com.pureinfo.dolphin.model.DolphinObject; import com.pureinfo.dolphin.persister.ISession; import com.pureinfo.force.exception.PureException; import com.pureinfo.importer.ref.IImportorRef; /** * <P> * Created on 2007-1-9 0:28:17 <BR> * Last modified on 2007-1-9 * </P> * TODO describe GetAmmountOfOutlayRef here ... * * @author Administrator * @version 1.0, 2007-1-9 * @since Command 1.0 */ public class GetAmmountOfOutlayRef implements IImportorRef { /** * @see com.pureinfo.importer.ref.IImportorRef#convert(com.pureinfo.dolphin.model.DolphinObject, * com.pureinfo.dolphin.model.DolphinObject, java.lang.String, * java.lang.String, com.pureinfo.dolphin.persister.ISession, * com.pureinfo.dolphin.persister.ISession, * com.pureinfo.dolphin.mapping.EntityMetadata, java.lang.String, * java.lang.String) */ public Object convert(DolphinObject _old, DolphinObject _new, String _sFromProperty, String _sToProperty, ISession _fromSession, ISession _toSession, EntityMetadata _metadata, String _sKey, String _sToTable) throws PureException { String sValue = _old.getStrProperty(_sFromProperty); if (StringUtils.isEmpty(sValue)) return null; double dblValue = Double.parseDouble(sValue); return "" + dblValue * 10000; } }