コード例 #1
0
  /**
   * @param obj
   * @return
   */
  @Override
  protected Object getResultData(TurbineUser record) {
    try {

      AccountResultData rd = new AccountResultData();
      rd.initField();
      rd.setUserId(record.getUserId().intValue());
      rd.setUserName(record.getLoginName());
      rd.setName(
          new StringBuffer()
              .append(record.getLastName())
              .append(" ")
              .append(record.getFirstName())
              .toString());
      rd.setPostNameList(ALEipUtils.getPostNameList(record.getUserId()));
      rd.setPositionName(ALEipUtils.getPositionName(record.getPositionId().intValue()));
      rd.setDisabled(record.getDisabled());
      rd.setHasPhoto("T".equals(record.getHasPhoto()) || "N".equals(record.getHasPhoto()));
      rd.setPhotoModified(record.getPhotoModified().getTime());
      rd.setEmail(record.getEmail());

      return rd;
    } catch (Exception ex) {
      logger.error("AccountUserSelectData.getResultData", ex);
      return null;
    }
  }
コード例 #2
0
  /**
   * @param obj
   * @return
   */
  @Override
  protected Object getResultDataDetail(ALBaseUser record) {
    try {
      Integer id = Integer.valueOf(record.getUserId());
      AccountResultData rd = new AccountResultData();
      rd.initField();
      rd.setUserId(Integer.valueOf(record.getUserId()).intValue());
      rd.setUserName(record.getUserName());
      rd.setName(
          new StringBuffer()
              .append(record.getLastName())
              .append(" ")
              .append(record.getFirstName())
              .toString());
      rd.setNameKana(
          new StringBuffer()
              .append(record.getLastNameKana())
              .append(" ")
              .append(record.getFirstNameKana())
              .toString());
      rd.setEmail(record.getEmail());
      rd.setOutTelephone(record.getOutTelephone());
      rd.setInTelephone(record.getInTelephone());
      rd.setCellularPhone(record.getCellularPhone());
      rd.setCellularMail(record.getCellularMail());
      rd.setPostNameList(ALEipUtils.getPostNameList(id.intValue()));
      rd.setPositionName(ALEipUtils.getPositionName(record.getPositionId()));
      rd.setDisabled(record.getDisabled());
      rd.setIsAdmin(ALEipUtils.isAdmin(Integer.valueOf(record.getUserId())));
      rd.setHasPhoto(record.hasPhoto());
      rd.setIsNewPhotoSpec("N".equals(record.hasPhotoString()));
      rd.setPhotoModified(record.getPhotoModified().getTime());

      return rd;
    } catch (Exception ex) {
      logger.error("AccountUserSelectData.getResultDataDetail", ex);
      return null;
    }
  }