@Override
	protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws IOException {
		DatabaseManager manager=DatabaseManager.getManager();
		
		String begin=request.getParameter(Booking.BEGIN);
		String end=request.getParameter(Booking.END);
		
		try {
			if(!MyServlet.isEmpty(begin) && !MyServlet.isEmpty(end)){
				SimpleDateFormat df=new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
				QueryBuilder<Booking, Integer> query=manager.getBookingDao().queryBuilder();
				
				query.where().ge("begin", df.parse(begin))
						.and().lt("end", df.parse(end));				
								
				
				ServletResult.sendResult(response, new GetResult(
						ServletResult.SUCCESS, fill(manager, query.query())));
			}
			else{
				ServletResult.sendResult(response, new GetResult(
						ServletResult.SUCCESS, fill(manager, manager.getBookingDao().queryForAll())));				
			}
		} catch (SQLException e) {
			e.printStackTrace();
			ServletResult.sendResult(response, ServletResult.ERROR);
		} catch (ParseException e) {
			e.printStackTrace();
			ServletResult.sendResult(response, ServletResult.BAD_DATE_FORMAT);
		}
	}