293294295296297298299300301
existingQuantity = rs.getInt("quantity"); } pStmt.close(); } catch (SQLException ex) { ex.printStackTrace(); throw new DBException(ex.getMessage()); } return existingQuantity; }
314315316317318319320321322323324
pStmt.setFloat(5, cash); status = pStmt.executeUpdate(); pStmt.close(); } catch (SQLException ex) { ex.printStackTrace(); throw new DBException(ex.getMessage()); } if (status == 0) { return false; } else { return true;
329330331332333334335336
public void remove() throws DBException { try { con.close(); } catch (SQLException ex) { throw new DBException(ex.getMessage()); } }