public ProductStock mapRow(ResultSet resultSet, int arg1) throws SQLException { ProductStock productStock = new ProductStock(); Product product = new Product(); product.setProductId(resultSet.getLong("product_id")); productStock.setGoodBalance(resultSet.getLong("good_balance")); productStock.setDefBalance(resultSet.getLong("def_balance")); productStock.setProduct(product); return productStock; }
public ProductStock mapRow(ResultSet resultSet, int arg1) throws SQLException { ProductStock productStock = new ProductStock(); productStock.setId(resultSet.getLong("id")); productStock.setGoodBalance(resultSet.getLong("good_balance")); productStock.setDefBalance(resultSet.getLong("def_balance")); productStock.setLastModified(resultSet.getString("last_modified")); Product product = new Product(); product.setProductId(resultSet.getLong("product_id")); product.setProductName(resultSet.getString("product_name")); Category category = new Category(); category.setCategoryId(resultSet.getLong("category_id")); category.setCategoryName(resultSet.getString("category_name")); product.setCategory(category); productStock.setProduct(product); return productStock; }
public StockRecord mapRow(ResultSet resultSet, int arg1) throws SQLException { StockRecord stockRecord = new StockRecord(); stockRecord.setRecordId(resultSet.getLong("record_id")); stockRecord.setTransDocRef(resultSet.getString("trans_doc_ref")); stockRecord.setFromTo(resultSet.getString("fromTo")); stockRecord.setGoodIn(resultSet.getLong("good_in")); stockRecord.setGoodOut(resultSet.getLong("good_out")); stockRecord.setGoodBalance(resultSet.getLong("good_balance")); stockRecord.setDefIn(resultSet.getLong("def_in")); stockRecord.setDefOut(resultSet.getLong("def_out")); stockRecord.setDefBalance(resultSet.getLong("def_balance")); stockRecord.setCreatedDate(resultSet.getString("created_date")); Product product = new Product(); product.setProductId(resultSet.getLong("product_id")); product.setProductName(resultSet.getString("product_name")); stockRecord.setProduct(product); return stockRecord; }