public List<CompanyPrincipal> getCompanyPrincipalByCompanyID(
     String companyPrincipalText, int companyId) {
   CompanyPrincipalDao companyPrincipalDao =
       AppContextUtil.getAppContext().getBean("companyPrincipalDao", CompanyPrincipalDao.class);
   Map<String, Object> param = new HashMap<String, Object>();
   if (!StringUtil.isEmpty(companyPrincipalText)) {
     param.put("xNAME_TEXT", companyPrincipalText);
   }
   if (companyId > 0) {
     param.put("xCOMPANY_xID", companyId);
   }
   return companyPrincipalDao.select(param);
 }
 public int update(CompanyPrincipal entity) {
   CompanyPrincipalDao companyPrincipalDao =
       AppContextUtil.getAppContext().getBean("companyPrincipalDao", CompanyPrincipalDao.class);
   return companyPrincipalDao.update(entity);
 }
 public CompanyPrincipal getCompanyPrincipal(int xID) {
   CompanyPrincipalDao companyPrincipalDao =
       AppContextUtil.getAppContext().getBean("companyPrincipalDao", CompanyPrincipalDao.class);
   return companyPrincipalDao.selectById(xID);
 }