@Override
	public ArrayList<Map<String,String>> getAllOngoingBidsOfUser(String user) {
		
		ArrayList<Map<String,String>> ongoingBidsList = new ArrayList<Map<String,String>>();
		
		TypedQuery<Bid> allOngoingBidsQuery = emgr.createNamedQuery("Bid.findOngoingBidsByUser", Bid.class);
		allOngoingBidsQuery.setParameter("userName", user);
		
		List<Bid> obtainedOngoingBidsList = allOngoingBidsQuery.getResultList();
		
		for (int i = 0; i < obtainedOngoingBidsList.size(); i++) {
			Map<String,String> bidsMap = new HashMap<String,String>();
			
			bidsMap.put("price", Double.toString(obtainedOngoingBidsList.get(i).getCurrentHighest()));
			Date date = obtainedOngoingBidsList.get(i).getBidDate();
			Calendar cal = Calendar.getInstance();
			Time time = obtainedOngoingBidsList.get(i).getBidTime();
			String[] splitTime = time.toString().split(":");
			
			cal.setTime(date);
			cal.set(Calendar.HOUR_OF_DAY, Integer.valueOf(splitTime[0]));
			cal.set(Calendar.MINUTE, Integer.valueOf(splitTime[1]));
			cal.set(Calendar.SECOND, Integer.valueOf(splitTime[2]));
			
			
			bidsMap.put("date", cal.getTime().toString());
			int auctionId = obtainedOngoingBidsList.get(i).getAuctionId();
			int bidId = obtainedOngoingBidsList.get(i).getBidId();
			bidsMap.put("auctionId", Integer.toString(auctionId));
			
			// Obtain the auction details from the database
			Auction auction = emgr.find(Auction.class, auctionId);
			bidsMap.put("auctionName", auction.getAuctionName());
			bidsMap.put("auctionDescription", auction.getAuctionDescription());
			
			// Obtain the bid details (e.g. whether the ongoing bid is still a winning bid)
			Bid bid = emgr.find(Bid.class, bidId);
			String winningBidUserName = bid.getUserName();
			bidsMap.put("winningBidUserName", winningBidUserName);
			
			ongoingBidsList.add(bidsMap);
		}
		
		return ongoingBidsList;
		
	}