private static List<Entity> selectItemsByRating(List<Entity> allEntities, String rating) {
		if (rating == null || rating.equals("") || rating.equalsIgnoreCase("all")){
			return allEntities;
		}
		
		List<Entity> ratedList = new ArrayList<Entity>();
		if (rating.equalsIgnoreCase("unlike")){
			for(Entity e : allEntities){
				Long first =(Long) e.getProperty("like");
				Long second =(Long) e.getProperty("unlike");
				if (second-first > 0){
					ratedList.add(e);
				}
			}
		} else if (rating.equalsIgnoreCase("like")) {
			for(Entity e : allEntities){
				Long first =(Long) e.getProperty("like");
				Long second =(Long) e.getProperty("unlike");
				if (first-second > 0){
					ratedList.add(e);
				}
			}
		}
		return ratedList;
	}