public static ArrayList<MediaCopy> getAllCopies() {
 		
 		try {
			   if(conn == null || conn.isClosed()){
			    conn = DatabaseConnection.getConnection();
			   }
			  } catch (SQLException e1) {
			   // TODO Auto-generated catch block
			   e1.printStackTrace();
			  }
		
		ArrayList<MediaCopy> mediaList = new ArrayList<MediaCopy>();
		
		try {
			Statement stmnt = conn.createStatement();
			String sql = "SELECT * FROM MediaCopies mc, Media m WHERE mc.media_id = m.media_id and mc.exist = 1";
			ResultSet res = stmnt.executeQuery(sql);

			while(res.next()) {
				MediaCopy mc = new MediaCopy(StringDateSwitcher.toDateYear(res.getString("year")), res.getString("place_of_publication"),
						res.getString("title"), res.getString("genre"), res.getInt("media_id"), 
						res.getString("creator"), res.getString("producer"),
						res.getString("type"), res.getInt("copy_id"), res.getBoolean("lendable"));
				mediaList.add(mc);
			}

		}
		catch(SQLException e) {
			System.out.println(e);
		}
		
		return mediaList;
	}