Exemplo n.º 1
0
  // 73
  public SmTbProductBean decodeRow(ResultSet rs, int[] fieldList) throws SQLException {
    SmTbProductBean pObject = createSmTbProductBean();
    int pos = 0;
    for (int i = 0; i < fieldList.length; i++) {
      switch (fieldList[i]) {
        case ID_PRD_ID:
          ++pos;
          pObject.setPrdId(Manager.getLong(rs, pos));
          break;
        case ID_PRD_TYPE_ID:
          ++pos;
          pObject.setPrdTypeId(Manager.getLong(rs, pos));
          break;
        case ID_NAME:
          ++pos;
          pObject.setName(rs.getString(pos));
          break;
        case ID_PRICE:
          ++pos;
          pObject.setPrice(Manager.getLong(rs, pos));
          break;
        case ID_PRICE_VIP:
          ++pos;
          pObject.setPriceVip(Manager.getLong(rs, pos));
          break;
        case ID_SUPLY_STATUS:
          ++pos;
          pObject.setSuplyStatus(rs.getString(pos));
          break;
        case ID_FORMAT_DESC:
          ++pos;
          pObject.setFormatDesc(rs.getString(pos));
          break;
        case ID_DETAIL_DESC:
          ++pos;
          pObject.setDetailDesc(rs.getString(pos));
          break;
        case ID_SEND_AREA:
          ++pos;
          pObject.setSendArea(rs.getString(pos));
          break;
        case ID_SEND_DESC:
          ++pos;
          pObject.setSendDesc(rs.getString(pos));
          break;
        case ID_PRD_PIC_FILE:
          ++pos;
          pObject.setPrdPicFile(rs.getString(pos));
          break;
        case ID_OWNER:
          ++pos;
          pObject.setOwner(Manager.getLong(rs, pos));
          break;
      }
    }
    pObject.isNew(false);
    pObject.resetIsModified();

    return pObject;
  }
Exemplo n.º 2
0
  // 72
  public SmTbProductBean decodeRow(ResultSet rs) throws SQLException {
    SmTbProductBean pObject = createSmTbProductBean();
    pObject.setPrdId(Manager.getLong(rs, 1));
    pObject.setPrdTypeId(Manager.getLong(rs, 2));
    pObject.setName(rs.getString(3));
    pObject.setPrice(Manager.getLong(rs, 4));
    pObject.setPriceVip(Manager.getLong(rs, 5));
    pObject.setSuplyStatus(rs.getString(6));
    pObject.setFormatDesc(rs.getString(7));
    pObject.setDetailDesc(rs.getString(8));
    pObject.setSendArea(rs.getString(9));
    pObject.setSendDesc(rs.getString(10));
    pObject.setPrdPicFile(rs.getString(11));
    pObject.setOwner(Manager.getLong(rs, 12));

    pObject.isNew(false);
    pObject.resetIsModified();

    return pObject;
  }