//package com.base.helper; // //import java.util.List; // //import jbo.app.tenwa.customer.CUSTOMER_ADDRESS; //import jbo.app.tenwa.customer.CUSTOMER_CERT; //import jbo.app.tenwa.customer.CUSTOMER_COMPANY; //import jbo.app.tenwa.customer.CUSTOMER_INFO; //import jbo.app.tenwa.customer.CUSTOMER_PERSON; //import jbo.com.tenwa.lease.comm.LB_UNION_LESSEE; // //import com.amarsoft.are.jbo.BizObject; //import com.amarsoft.are.jbo.BizObjectManager; //import com.amarsoft.are.jbo.BizObjectQuery; //import com.amarsoft.are.jbo.JBOException; //import com.amarsoft.are.jbo.JBOFactory; //import com.base.constant.RestfullConstant; // //public class CustomerHelper { // private final static String COMPANY_TYPE = RestfullConstant.baseProperty // .get("CUSTOMER_TYPE_COMPANY").toString(); // 01 // private final static String PERSON_TYPE = RestfullConstant.baseProperty // .get("CUSTOMER_TYPE_PERSON").toString(); // 03 // // public static BizObject getCustomerCertInfo(String sCertType, String sCertId) // throws JBOException { // BizObjectManager manage = JBOFactory // .getBizObjectManager(CUSTOMER_CERT.CLASS_NAME); // BizObjectQuery query = manage // .createQuery("CERTTYPE=:CERTTYPE AND CERTID=:CERTID") // .setParameter("CERTTYPE", sCertType) // .setParameter("CERTID", sCertId); // BizObject object = query.getSingleResult(false); // return object; // } // // public static BizObject getCustomerInfo(String sCertType, String sCertId) // throws JBOException { // BizObjectManager manage = JBOFactory // .getBizObjectManager(CUSTOMER_INFO.CLASS_NAME); // BizObjectQuery query = manage // .createQuery("CERTTYPE=:CERTTYPE AND CERTID=:CERTID") // .setParameter("CERTTYPE", sCertType) // .setParameter("CERTID", sCertId); // BizObject object = query.getSingleResult(false); // return object; // } // // public static BizObject getCustomerInfo(String sCustomerId) // throws JBOException { // BizObjectManager manage = JBOFactory // .getBizObjectManager(CUSTOMER_INFO.CLASS_NAME); // BizObjectQuery query = manage.createQuery("CUSTOMERID=:CUSTOMERID") // .setParameter("CUSTOMERID", sCustomerId); // BizObject object = query.getSingleResult(false); // return object; // } // // public static BizObject getCustomerInfoByProject(String sProjectId) // throws JBOException { // String sSql = "SELECT O.* FROM O," + LB_UNION_LESSEE.CLASS_NAME // + " LB_UNION_LESSEE"; // sSql += " WHERE LB_UNION_LESSEE.PROJECT_ID=:PROJECT_ID"; // BizObjectManager boManage = JBOFactory // .getBizObjectManager(CUSTOMER_INFO.CLASS_NAME); // BizObjectQuery boQuery = boManage.createQuery(sSql).setParameter( // "PROJECT_ID", sProjectId); // return boQuery.getSingleResult(false); // } // // public static BizObject getCustomerDetail(String sCustomerType, // String sCustomerId) throws JBOException { // BizObjectManager manage = null; // manage = COMPANY_TYPE.equals(sCustomerType) ? JBOFactory // .getBizObjectManager(CUSTOMER_COMPANY.CLASS_NAME) : PERSON_TYPE // .equals(sCustomerType) ? JBOFactory // .getBizObjectManager(CUSTOMER_PERSON.CLASS_NAME) : null; // BizObjectQuery query = manage.createQuery("CUSTOMERID=:CUSTOMERID") // .setParameter("CUSTOMERID", sCustomerId); // BizObject object = query.getSingleResult(false); // return object; // } // // public static List getCustomerAddress(String sCustomerId) // throws JBOException { // BizObjectManager manage = JBOFactory // .getBizObjectManager(CUSTOMER_ADDRESS.CLASS_NAME); // BizObjectQuery query = manage.createQuery("CUSTOMERID=:CUSTOMERID") // .setParameter("CUSTOMERID", sCustomerId); // @SuppressWarnings("unchecked") // List list = query.getResultList(false); // return list; // } //}