public List<Reservation> getReservationsByCustomerId(int customerid){
		
		List<Reservation> res=new ArrayList<Reservation>();
		Connection con=null;
		Statement stmt=null;
		
		try {
			
            DBconnection dbCon = new DBconnection();
            Class.forName(dbCon.getJDBC_DRIVER());

            con = DriverManager.getConnection(dbCon.getDATABASE_URL(),
                    dbCon.getDB_USERNAME(), dbCon.getDB_PASSWORD());

            stmt = con.createStatement();
            ResultSet rs = stmt.executeQuery("Select res_id,res_book,res_customer,res_date "
            		+ "From reservation where res_customer="+customerid);
            while (rs.next()) {
                Reservation reservation = new Reservation();
                reservation.setReservationId(rs.getInt(1));
                reservation.setBookId(rs.getInt(2));
                reservation.setCustomerId(rs.getInt(3));
              
                Timestamp timestamp=rs.getTimestamp(4);
                Date date=new Date(timestamp.getTime());
               
                reservation.setDate(date);
                
                res.add(reservation);
            }
        } catch (SQLException | ClassNotFoundException ex) {
            System.err.println("Caught Exception: " + ex.getMessage());
        } finally {
            try {
                if (stmt != null) {
                    stmt.close();
                }
                if (con != null) {
                    con.close();
                }
            } catch (SQLException ex) {
                System.err.println("Caught Exception: " + ex.getMessage());
            }
        }
        return res;
		
		
	}