public ArrayList<CheckOut> getAllCheckOuts(Timestamp startDate, Timestamp endDate) throws Exception {
		
		Connection connect = null;
		Statement statement = null;
		ResultSet resultSet = null;
		
		ArrayList<CheckOut> checkOutList = new ArrayList<CheckOut>();
		
		try {
			
			// First connect to the database
			connect = DriverManager.getConnection("jdbc:mysql://localhost:3306/librarysystem?user=admin&password=123456");
			statement = connect.createStatement();
			
			// create a view of checkouts without returns
			createCheckOutView();
			
			// Get all the checkouts in the resultSet
			// the start timestamp must be within the startDate and the endDate
			resultSet = statement.executeQuery("SELECT * "
					+ "FROM NoReturnCheckOut NRC "
					+ "ORDER BY NRC.start desc");

			// Add all checkouts in the resultSet into the ArrayList, checkOutLIst
			while(resultSet.next()){
				
				Timestamp checkStart = resultSet.getTimestamp(2);
				
				if(checkStart.getTime() > startDate.getTime() && checkStart.getTime() < endDate.getTime()){
					
					CheckOut co = new CheckOut();
					co.setIsbn(resultSet.getLong(1));
					co.setStart(resultSet.getTimestamp(2));
					co.setEnd(resultSet.getTimestamp(3));
					co.setCardNumber(resultSet.getInt(4));
					co.setIdNumber(resultSet.getInt(5));
					checkOutList.add(co);
					
				}
			}
			
			statement.executeUpdate("DROP VIEW NoReturnCheckOut");
			
		} catch (Exception e) {
			System.out.println(e.getMessage());
			throw e;
		}
		
			finally
			{
				try {

					if(connect != null){
					connect.close();
					}
					
					if(statement != null){
					statement.close();
					}
					
					if(resultSet != null){
					resultSet.close();
					}
					
				} catch (Exception e) {	
					
				}
			}
		
		return checkOutList;
	}