Exemplo n.º 1
0
 /**
  * 根据主键(id)返回单条记录
  *
  * @param id
  * @return XjSchoolInfo
  */
 public XjSchoolInfo findOne(long id) throws BusinessException {
   XjSchoolMapper xjSchoolMapper =
       SpringUtil.getSpringBean(XjSchoolMapper.class, "xjSchoolMapper");
   XjSchoolEntry entry = xjSchoolMapper.findOne(this.getDaoAbb(), id);
   if (entry != null) {
     this.setId(entry.getId());
     this.setTownId(entry.getTownId());
     this.setSchoolName(entry.getSchoolName());
     this.setSchoolType(entry.getSchoolType());
     this.setEstablishDate(entry.getEstablishDate());
     this.setSchoolMode(entry.getSchoolMode());
     this.setAddress(entry.getAddress());
     this.setSchoolClass(entry.getSchoolClass());
     this.setSchoolBank(entry.getSchoolBank());
     this.setSchoolAddr(entry.getSchoolAddr());
     this.setPostCode(entry.getPostCode());
     this.setPhone(entry.getPhone());
     this.setWebsite(entry.getWebsite());
     this.setEmail(entry.getEmail());
     this.setSchoolMaster(entry.getSchoolMaster());
     this.setMobie(entry.getMobie());
     this.setLearnyear(entry.getLearnyear());
     this.setAreaId(entry.getAreaId());
     this.setSection(entry.getSection());
     this.setCreateTime(entry.getCreateTime());
     this.setAdcEcCode(entry.getAdcEcCode());
     this.setSchCode(entry.getSchCode());
     this.setShortName(entry.getShortName());
     this.setIsLong(entry.getIsLong());
     this.setSiId(entry.getSiId());
     this.setSiName(entry.getSiName());
     this.setTownName(entry.getTownName());
     this.setAreaName(entry.getAreaName());
     this.setAreaCode(entry.getAreaCode());
     this.setAreaAbb(entry.getAreaAbb());
     entry = null;
   } else {
     this.xjSchoolEntry = new XjSchoolEntry();
   }
   return this;
 }