public void dump()
  {
    // retrieve all hostels in the system
    try {
      ArrayList<Identifier> hostelIds = Hostels.getInstance().search(new Hostel());
      System.out.println("----- ALL HOSTELS IN THE SYSTEM -----");
      if (hostelIds.size() > 0) {
        for (Identifier hostelId : hostelIds) {
          Hostel hostelInfo = Hostels.getInstance().get(hostelId);
          System.out.println(hostelInfo.toString());
          // now dump all beds in this hostel
          System.out.println("----- ALL BEDS IN HOSTEL " +  hostelInfo.getName()  + "-----");
          Bed searchBed = new Bed();
          searchBed.setHostelId(hostelId);
          ArrayList<Identifier> bedIds = Beds.getInstance().search(searchBed);
          if (bedIds.size() > 0) {
            for (Identifier bedId : bedIds) {
              Bed bedInfo = Beds.getInstance().get(bedId);
              System.out.println(bedInfo.toString());
            }
          }
          else {
            System.out.println("no beds found.");
            System.out.println();
          }
          
          // now dump all the bookings in this hostel
          System.out.println("----- ALL BOOKINGS IN HOSTEL " +  hostelInfo.getName()  + "-----");
          Booking searchBooking = new Booking();
          searchBooking.setHostelId(hostelId);
          ArrayList<Identifier> bookingIds = Bookings.getInstance().search(searchBooking);
          if (bookingIds.size() > 0) {
            for (Identifier bookingId : bookingIds) {
              Booking bookingInfo = Bookings.getInstance().get(bookingId);
              System.out.println(bookingInfo.toString());
            }
          }
          else {
            System.out.println("no bookings found.");
            System.out.println();
          }
        }
      }
      else {
        System.out.println("No hostels found in the system.");
        System.out.println();
      }
      
      System.out.println("----- ALL USERS IN THE SYSTEM -----");
      ArrayList<Identifier> userIds = Users.getInstance().search(new User());
      if (userIds.size() > 0) {
        for (Identifier userId : userIds) {
          User userInfo = Users.getInstance().get(userId);
          System.out.println(userInfo.toString());
        }
      }
      else {
        System.out.println("No users found in the system.");
        System.out.println();
      }
      
    }
    catch (DataBaseReadWriteException | IdentifierNotFoundException | InvalidIdentifierException e) {
      // No hostels
      System.out.println("something wrong in the system.");
      return;
    }
  }