@Override
	public ArrayList<Map<String, String>> getAllWonBidsOfUser(String user) {
		System.out.println("getAllWonAuctionsOfUser");
		ArrayList<Map<String, String>> bidsList = new ArrayList<Map<String,String>>();
		
		
		TypedQuery<Bid> allWonBidsQuery = emgr.createNamedQuery("Bid.findAllWonAuctionsByUser", Bid.class);
		allWonBidsQuery.setParameter("userName", user);
		List<Bid> obtainedBids = allWonBidsQuery.getResultList();
		System.out.println("OBTAINED BIDS SIZe = " + obtainedBids.size());
		
		for (int i = 0; i < obtainedBids.size(); i++) {
			/*String highestBid = Double.toString(obtainedBids.get(i).getCurrentHighest());
			String dateBid = obtainedBids.get(i).getBidDate().toString();
			bids.add(highestBid + ":" + dateBid);*/
			
			Map<String,String> bidsMap = new HashMap<String,String>();
			
			bidsMap.put("price", Double.toString(obtainedBids.get(i).getCurrentHighest()));
			Date date = obtainedBids.get(i).getBidDate();
			Calendar cal = Calendar.getInstance();
			Time time = obtainedBids.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 = obtainedBids.get(i).getAuctionId();
			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());
			
			bidsList.add(bidsMap);
		}
		
		
		System.out.println("Returning bidsList = " + bidsList);
		return bidsList;
		
	}