package com.tenwa.reckon.copydata; import jbo.com.tenwa.entity.comm.own.OWN_ACCOUNT; import com.amarsoft.are.jbo.BizObject; import com.amarsoft.are.jbo.JBOException; import com.amarsoft.are.jbo.JBOFactory; import com.amarsoft.are.jbo.JBOTransaction; import com.tenwa.comm.util.jboutil.BizObjectCompare; public class CalcRentCompare implements BizObjectCompare{ private String accountType; private String accType; private String state; private String FbSdk; @Override public boolean ObjectCompare(BizObject cObject, BizObject toObject) throws Exception { if(cObject.getAttribute("plan_list").getString().equals(toObject.getAttribute("plan_list").getString())){ return true; } return false; } public String getAccountType() { return accountType; } public void setAccountType(String accountType) { this.accountType = accountType; } public String getAccType() { return accType; } public void setAccType(String accType) { this.accType = accType; } public String getState() { return state; } public void setState(String state) { this.state = state; } public String getFbSdk() { return FbSdk; } public void setFbSdk(String fbSdk) { FbSdk = fbSdk; } public String compare(JBOTransaction tx) throws JBOException{ String sql ="select * from O where O.state_='0010' and O.ACC_TYPE='0010' and O.FbSdk='Y' and (O.account_type='out_account' or O.account_type='inAndOut_account')"; BizObject bo = JBOFactory.createBizObjectQuery(OWN_ACCOUNT.CLASS_NAME,sql).getSingleResult(false); if(bo==null||"".equals(bo)){ return "null"; } return bo.getAttribute("id").toString(); } }