@@ -0,0 +1,2506 @@
+package Entity;%0A%0Aimport java.sql.Connection;%0Aimport java.sql.DriverManager;%0Aimport java.sql.ResultSet;%0Aimport java.sql.SQLException;%0Aimport java.sql.Statement;%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0A%0A%0A/**%0A *%0A * @author peter%0A */%0A%0A%0A%0Apublic class ListBasket%0A%7B%0A%0A    List%3CBasketObject%3E  thePizzas = new ArrayList%3C%3E();  // Pizzaobject is ONE pizza. This is an array of pizza objects%0A%0A    public ListBasket() %7B%0A    %7D%0A%0A    public List%3CBasketObject%3E getBasket(String sessionId) throws InterruptedException %7B%0A        String dbURL = %22jdbc:derby://localhost:1527//home/peter/pizzabase%22;%0A        String tableName = %22basket%22;%0A        // jdbc Connection%0A        Connection conn = null;%0A        Statement stmt = null;%0A%0A        try%0A        %7B%0A            Class.forName(%22org.apache.derby.jdbc.ClientDriver%22).newInstance();%0A            //Get a connection%0A            conn = DriverManager.getConnection(dbURL); %0A        %7D%0A        catch (ClassNotFoundException cnfe) %7B%0A            System.err.println(%22Derby driver not found.%22);%0A        %7D%0A        catch (InstantiationException %7C IllegalAccessException %7C SQLException except)%0A        %7B%0A            except.printStackTrace();%0A        %7D%0A%0A%0A        try%0A        %7B%0A            stmt = conn.createStatement();%0A            ResultSet results = stmt.executeQuery(%22select customer, pizzaorder, quantity, price from %22 + tableName + %22 where SESSION = '%22 + sessionId + %22'%22);%0A%0A            while(results.next())%0A            %7B%0A                BasketObject bo = new BasketObject();%0A%0A                bo.setName(results.getString(1));%0A                %0A                bo.setOrder(results.getString(2));%0A                %0A                bo.setQuantity(Integer.valueOf(results.getString(3)));%0A                bo.setPrice(Integer.valueOf(results.getString(4)));%0A                %0A                thePizzas.add(bo);%0A                %0A            %7D%0A%0A%0A            results.close();%0A            stmt.close();%0A            %7D%0A            catch (SQLException sql)%0A            %7B%0A                sql.printStackTrace();%0A            %7D%0A%0A            try%0A            %7B%0A                if (stmt != null)%0A                %7B%0A                    stmt.close();%0A                %7D%0A                if (conn != null)%0A                %7B%0A                    DriverManager.getConnection(dbURL);%0A                    conn.close();%0A                %7D           %0A            %7D%0A            catch (SQLException sql)%0A            %7B%0A                sql.printStackTrace();%0A            %7D%0A            %0A        return thePizzas;%0A    %7D%0A%7D%0A%0A

Create ListBasket.java