@Override
	public boolean update(T e) {
		PreparedStatement ps = null;
		boolean res = false;
		try {
			ps = db.getConnection().prepareStatement(getUpdateSQL());
			int c = fillInStatement(ps, e);
			ps.setInt(c + 1, e.getId());
			int numcol = ps.executeUpdate();
			res = numcol == 1;		
			
		} catch (SQLException ex) {
			log.log(Level.SEVERE, "update location failed: " + ex.getMessage(), ex);
		} finally {
			try {
				if (ps != null) ps.close();
			} catch (SQLException es) {
				log.log(Level.WARNING, "failed to close ResultSet: " + es.getMessage(), es);
			}
		}
		
		return res;
	}