/**
 * Copyright (C) 2014 Kasper Kronborg Isager and Sigrið Gyldenkærne Dalsgarð.
 */
package dk.itu.bookie.controller;

// General utilities
import java.util.ResourceBundle;

// Net utilities
import java.net.URL;

// FXML utilities
import javafx.fxml.Initializable;

/**
 * Application controller class.
 *
 * @version 1.0.0
 */
public final class ApplicationController implements Initializable {
  private static ApplicationController instance;

  public ApplicationController getInstance() {
    return ApplicationController.instance;
  }

  public void initialize(URL url, ResourceBundle resourceBundle) {
    ApplicationController.instance = this;
  }
}

@@ -215,55 +215,337 @@
 %0A// 
-FXML utilities%0Aimport javafx.fxml.Initializable
+SQL utilities%0Aimport java.sql.SQLException;%0A%0A// JavaFX collections%0Aimport javafx.collections.FXCollections;%0Aimport javafx.collections.ObservableList;%0A%0A// FXML utilities%0Aimport javafx.fxml.FXML;%0A%0A// Donkey utilities%0Aimport dk.itu.donkey.Model;%0A%0A// Models%0Aimport dk.itu.bookie.model.Showtime;%0Aimport dk.itu.bookie.model.Reservation
 ;%0A%0A/
@@ -650,33 +650,8 @@
 ler 
-implements Initializable 
 %7B%0A  
@@ -698,16 +698,130 @@
 tance;%0A%0A
+  private static ObservableList%3CShowtime%3E showtimes;%0A%0A  private static ObservableList%3CReservation%3E reservations;%0A%0A
   public
@@ -936,50 +936,655 @@
 ize(
-URL url, ResourceBundle resourceBundle
+) %7B%0A    ApplicationController.instance = this;%0A  %7D%0A%0A  public static ObservableList%3CShowtime%3E showtimes() throws SQLException %7B%0A    if (ApplicationController.showtimes == null) %7B%0A      ApplicationController.showtimes = FXCollections.observableArrayList(%0A        Model%0A          .find(Showtime.class)%0A          .where(%22playingat%22, %22%3E%22, System.currentTimeMillis())%0A          .orderBy(%22movies.name%22)%0A          .orderBy(%22playingat%22)%0A          .get()%0A      );%0A    %7D%0A%0A    return ApplicationController.showtimes;%0A  %7D%0A%0A  public static ObservableList%3CReservation%3E reservations() throws SQLException %7B%0A    if (ApplicationController.reservations == null
 ) %7B%0A
+  
     
@@ -1601,35 +1601,312 @@
 nController.
-instance = thi
+reservations = FXCollections.observableArrayList(%0A        Model%0A          .find(Reservation.class)%0A          .where(%22showtimes.playingat%22, %22%3E%22, System.currentTimeMillis())%0A          .orderBy(%22showtimes.playingat%22)%0A          .get()%0A      );%0A    %7D%0A%0A    return ApplicationController.reservation
 s;%0A  %7D%0A%7D%0A

Handle data querying in Application controller.