Package org.agoncal.training.javaee6.domain

Examples of org.agoncal.training.javaee6.domain.CD


        itemEJB.createBook(new Book("l Nome della Rosa", 34.99f, "Science fiction comedy book", 354, Boolean.FALSE, Language.ITALIAN));
        logger.info("&&&&&&&&&&&&&& Inserted " + itemEJB.findAllBooks().size() + " Books");
    }

    private void createCDs() {
        itemEJB.createCD(new CD("Genesis", 12.99f, "Genesis are an English rock band that formed in 1967", "Atlantic", 1, 44.10f, "Prog"));
        itemEJB.createCD(new CD("The Dark Side of the Moon", 14.99f, "Pink Floyd were an English rock band", "Emi", 1, 42.59f, "Psyche"));
        itemEJB.createCD(new CD("Minor Swing", 1.99f, "Pioneering virtuoso jazz guitarist and composer", "None", 1, 3.18f, "Jazz"));
        itemEJB.createCD(new CD("Simon and Garfunkel in Central Park", 23.99f, "Live album recorded on September 19, 1981", "Island", 2, 75.51f, "Pop"));
        itemEJB.createCD(new CD("Blue Monday", 1.99f, "New Order's longest tracks ever to chart", "Factory", 1, 7.29f, "Jazz"));
        itemEJB.createCD(new CD("The Unforgettable Fire", 13.99f, "The Unforgettable Fire is the fourth studio album by Irish rock band U2", "Island", 1, 42.38f, "Jazz"));
        itemEJB.createCD(new CD("Synchronicity", 15.99f, "Fifth and final studio album by The Police, released in 1983", "Emi", 1, 44.32f, "Pop"));
        itemEJB.createCD(new CD("Bireli Lagrene & Gypsy Project", 16.98f, "has perhaps inherited more of Django's musical spirit", "Dreyfus", 2, 58.12f, "Jazz"));
        logger.info("&&&&&&&&&&&&&& Inserted " + itemEJB.findAllCDs().size() + " CDs");
    }
View Full Code Here


        itemEJB.createBook(new Book("l Nome della Rosa", 34.99f, "Science fiction comedy book", 354, Boolean.FALSE, Language.ITALIAN));
        logger.info("&&&&&&&&&&&&&& Inserted " + itemEJB.findAllBooks().size() + " Books");
    }

    private void createCDs() {
        itemEJB.createCD(new CD("Genesis", 12.99f, "Genesis are an English rock band that formed in 1967", "Atlantic", 1, 44.10f, "Prog"));
        itemEJB.createCD(new CD("The Dark Side of the Moon", 14.99f, "Pink Floyd were an English rock band", "Emi", 1, 42.59f, "Psyche"));
        itemEJB.createCD(new CD("Minor Swing", 1.99f, "Pioneering virtuoso jazz guitarist and composer", "None", 1, 3.18f, "Jazz"));
        itemEJB.createCD(new CD("Simon and Garfunkel in Central Park", 23.99f, "Live album recorded on September 19, 1981", "Island", 2, 75.51f, "Pop"));
        itemEJB.createCD(new CD("Blue Monday", 1.99f, "New Order's longest tracks ever to chart", "Factory", 1, 7.29f, "Jazz"));
        itemEJB.createCD(new CD("The Unforgettable Fire", 13.99f, "The Unforgettable Fire is the fourth studio album by Irish rock band U2", "Island", 1, 42.38f, "Jazz"));
        itemEJB.createCD(new CD("Synchronicity", 15.99f, "Fifth and final studio album by The Police, released in 1983", "Emi", 1, 44.32f, "Pop"));
        itemEJB.createCD(new CD("Bireli Lagrene & Gypsy Project", 16.98f, "has perhaps inherited more of Django's musical spirit", "Dreyfus", 2, 58.12f, "Jazz"));
        logger.info("&&&&&&&&&&&&&& Inserted " + itemEJB.findAllCDs().size() + " CDs");
    }
View Full Code Here

        itemEJB.createBook(new Book("l Nome della Rosa", 34.99f, "Science fiction comedy book", 354, Boolean.FALSE, Language.ITALIAN));
        logger.info("&&&&&&&&&&&&&& Inserted " + itemEJB.findAllBooks().size() + " Books");
    }

    private void createCDs() {
        itemEJB.createCD(new CD("Genesis", 12.99f, "Genesis are an English rock band that formed in 1967", "Atlantic", 1, 44.10f, "Prog"));
        itemEJB.createCD(new CD("The Dark Side of the Moon", 14.99f, "Pink Floyd were an English rock band", "Emi", 1, 42.59f, "Psyche"));
        itemEJB.createCD(new CD("Minor Swing", 1.99f, "Pioneering virtuoso jazz guitarist and composer", "None", 1, 3.18f, "Jazz"));
        itemEJB.createCD(new CD("Simon and Garfunkel in Central Park", 23.99f, "Live album recorded on September 19, 1981", "Island", 2, 75.51f, "Pop"));
        itemEJB.createCD(new CD("Blue Monday", 1.99f, "New Order's longest tracks ever to chart", "Factory", 1, 7.29f, "Jazz"));
        itemEJB.createCD(new CD("The Unforgettable Fire", 13.99f, "The Unforgettable Fire is the fourth studio album by Irish rock band U2", "Island", 1, 42.38f, "Jazz"));
        itemEJB.createCD(new CD("Synchronicity", 15.99f, "Fifth and final studio album by The Police, released in 1983", "Emi", 1, 44.32f, "Pop"));
        itemEJB.createCD(new CD("Bireli Lagrene & Gypsy Project", 16.98f, "has perhaps inherited more of Django's musical spirit", "Dreyfus", 2, 58.12f, "Jazz"));
        logger.info("&&&&&&&&&&&&&& Inserted " + itemEJB.findAllCDs().size() + " CDs");
    }
View Full Code Here

        itemEJB.createBook(new Book("l Nome della Rosa", 34.99f, "Science fiction comedy book", 354, Boolean.FALSE, Language.ITALIAN));
        logger.info("&&&&&&&&&&&&&& Inserted " + itemEJB.findAllBooks().size() + " Books");
    }

    private void createCDs() {
        itemEJB.createCD(new CD("Genesis", 12.99f, "Genesis are an English rock band that formed in 1967", "Atlantic", 1, 44.10f, "Prog"));
        itemEJB.createCD(new CD("The Dark Side of the Moon", 14.99f, "Pink Floyd were an English rock band", "Emi", 1, 42.59f, "Psyche"));
        itemEJB.createCD(new CD("Minor Swing", 1.99f, "Pioneering virtuoso jazz guitarist and composer", "None", 1, 3.18f, "Jazz"));
        itemEJB.createCD(new CD("Simon and Garfunkel in Central Park", 23.99f, "Live album recorded on September 19, 1981", "Island", 2, 75.51f, "Pop"));
        itemEJB.createCD(new CD("Blue Monday", 1.99f, "New Order's longest tracks ever to chart", "Factory", 1, 7.29f, "Jazz"));
        itemEJB.createCD(new CD("The Unforgettable Fire", 13.99f, "The Unforgettable Fire is the fourth studio album by Irish rock band U2", "Island", 1, 42.38f, "Jazz"));
        itemEJB.createCD(new CD("Synchronicity", 15.99f, "Fifth and final studio album by The Police, released in 1983", "Emi", 1, 44.32f, "Pop"));
        itemEJB.createCD(new CD("Bireli Lagrene & Gypsy Project", 16.98f, "has perhaps inherited more of Django's musical spirit", "Dreyfus", 2, 58.12f, "Jazz"));
        logger.info("&&&&&&&&&&&&&& Inserted " + itemEJB.findAllCDs().size() + " CDs");
    }
View Full Code Here

        itemEJB.createBook(new Book("l Nome della Rosa", 34.99f, "Science fiction comedy book", 354, Boolean.FALSE, Language.ITALIAN));
        logger.info("&&&&&&&&&&&&&& Inserted " + itemEJB.findAllBooks().size() + " Books");
    }

    private void createCDs() {
        itemEJB.createCD(new CD("Genesis", 12.99f, "Genesis are an English rock band that formed in 1967", "Atlantic", 1, 44.10f, "Prog"));
        itemEJB.createCD(new CD("The Dark Side of the Moon", 14.99f, "Pink Floyd were an English rock band", "Emi", 1, 42.59f, "Psyche"));
        itemEJB.createCD(new CD("Minor Swing", 1.99f, "Pioneering virtuoso jazz guitarist and composer", "None", 1, 3.18f, "Jazz"));
        itemEJB.createCD(new CD("Simon and Garfunkel in Central Park", 23.99f, "Live album recorded on September 19, 1981", "Island", 2, 75.51f, "Pop"));
        itemEJB.createCD(new CD("Blue Monday", 1.99f, "New Order's longest tracks ever to chart", "Factory", 1, 7.29f, "Jazz"));
        itemEJB.createCD(new CD("The Unforgettable Fire", 13.99f, "The Unforgettable Fire is the fourth studio album by Irish rock band U2", "Island", 1, 42.38f, "Jazz"));
        itemEJB.createCD(new CD("Synchronicity", 15.99f, "Fifth and final studio album by The Police, released in 1983", "Emi", 1, 44.32f, "Pop"));
        itemEJB.createCD(new CD("Bireli Lagrene & Gypsy Project", 16.98f, "has perhaps inherited more of Django's musical spirit", "Dreyfus", 2, 58.12f, "Jazz"));
        logger.info("&&&&&&&&&&&&&& Inserted " + itemEJB.findAllCDs().size() + " CDs");
    }
View Full Code Here

        itemEJB.createBook(new Book("l Nome della Rosa", 34.99f, "Science fiction comedy book", 354, Boolean.FALSE, Language.ITALIAN));
        logger.info("&&&&&&&&&&&&&& Inserted " + itemEJB.findAllBooks().size() + " Books");
    }

    private void createCDs() {
        itemEJB.createCD(new CD("Genesis", 12.99f, "Genesis are an English rock band that formed in 1967", "Atlantic", 1, 44.10f, "Prog"));
        itemEJB.createCD(new CD("The Dark Side of the Moon", 14.99f, "Pink Floyd were an English rock band", "Emi", 1, 42.59f, "Psyche"));
        itemEJB.createCD(new CD("Minor Swing", 1.99f, "Pioneering virtuoso jazz guitarist and composer", "None", 1, 3.18f, "Jazz"));
        itemEJB.createCD(new CD("Simon and Garfunkel in Central Park", 23.99f, "Live album recorded on September 19, 1981", "Island", 2, 75.51f, "Pop"));
        itemEJB.createCD(new CD("Blue Monday", 1.99f, "New Order's longest tracks ever to chart", "Factory", 1, 7.29f, "Jazz"));
        itemEJB.createCD(new CD("The Unforgettable Fire", 13.99f, "The Unforgettable Fire is the fourth studio album by Irish rock band U2", "Island", 1, 42.38f, "Jazz"));
        itemEJB.createCD(new CD("Synchronicity", 15.99f, "Fifth and final studio album by The Police, released in 1983", "Emi", 1, 44.32f, "Pop"));
        itemEJB.createCD(new CD("Bireli Lagrene & Gypsy Project", 16.98f, "has perhaps inherited more of Django's musical spirit", "Dreyfus", 2, 58.12f, "Jazz"));
        logger.info("&&&&&&&&&&&&&& Inserted " + itemEJB.findAllCDs().size() + " CDs");
    }
View Full Code Here

        EJBContainer ec = EJBContainer.createEJBContainer(properties);
        Context ctx = ec.getContext();

        // Looks up for the EJB
        ItemEJB itemEJB = (ItemEJB) ctx.lookup("java:global/classes/ItemEJB");

        // Creates an instance of book
        Book book = new Book("H2G2", 12.5f, "Best IT Scifi Book", "1234-5678-5678", 247, false, Language.ENGLISH);
        // Tags
        List<String> tags = new ArrayList<String>();
        tags.add("scifi");
        tags.add("french");
        book.setTags(tags);
        // Chapters
        Chapter chapter1 = new Chapter("Arriving on earth", "blah blah blah blah blah");
        Chapter chapter2 = new Chapter("Restaurant of the universe", "Forty two");
        List<Chapter> chapters = new ArrayList<Chapter>();
        chapters.add(chapter1);
        chapters.add(chapter2);
        book.setChapters(chapters);

        // Creates an instance of CD
        CD cd = new CD("St Pepper", 12.80f, "Beatles master piece", "Apple", 1, 53.32f, "Pop");
        // Tracks
        Track track1 = new Track("Sgt Pepper Lonely Heart Club Ban", 4.53f, "Listen to the trumpet carefully, it's George Harrison playing");
        Track track2 = new Track("Fixing a Hole", 3.34f, "Beleive it or not, this song is about drugs");
        List<Track> tracks = new ArrayList<Track>();
        tracks.add(track1);
        tracks.add(track2);
        cd.setTracks(tracks);

        // Persists the book to the database
        itemEJB.createBook(book);

        // Persists the CD to the database
        itemEJB.createCD(cd);

        // Finds all the items
        logger.info("##### All items");
        List<Item> items = itemEJB.findAllItems();
        for (Item oneItem : items) {
            logger.info("# " + oneItem);
        }

        // Finds all the CDs
        logger.info("##### All CDs");
        List<CD> cds = itemEJB.findAllCDs();
        for (CD oneCD : cds) {
            logger.info("# " + oneCD);
        }

        // Finds all the Books
        logger.info("##### All Books");
        List<Book> books = itemEJB.findAllBooks();
        for (Book oneBook : books) {
            logger.info("# " + oneBook);
        }

        ec.close();
View Full Code Here

        EJBContainer ec = EJBContainer.createEJBContainer(properties);
        Context ctx = ec.getContext();

        // Looks up for the EJB
        ItemEJB itemEJB = (ItemEJB) ctx.lookup("java:global/classes/ItemEJB");

        // Creates an instance of book
        Book book = new Book("H2G2", 12.5f, "Best IT Scifi Book", 247, false, Language.ENGLISH);
        // Tags
        List<String> tags = new ArrayList<String>();
        tags.add("scifi");
        tags.add("french");
        book.setTags(tags);
        // Chapters
        Chapter chapter1 = new Chapter("Arriving on earth", "blah blah blah blah blah");
        Chapter chapter2 = new Chapter("Restaurant of the universe", "Forty two");
        List<Chapter> chapters = new ArrayList<Chapter>();
        chapters.add(chapter1);
        chapters.add(chapter2);
        book.setChapters(chapters);

        // Creates an instance of CD
        CD cd = new CD("St Pepper", 12.80f, "Beatles master piece", "Apple", 1, 53.32f, "Pop");
        // Tracks
        Track track1 = new Track("Sgt Pepper Lonely Heart Club Ban", 4.53f, "Listen to the trumpet carefully, it's George Harrison playing");
        Track track2 = new Track("Fixing a Hole", 3.34f, "Beleive it or not, this song is about drugs");
        List<Track> tracks = new ArrayList<Track>();
        tracks.add(track1);
        tracks.add(track2);
        cd.setTracks(tracks);

        // Persists the book to the database
        itemEJB.createBook(book);

        // Persists the CD to the database
        itemEJB.createCD(cd);

        // Finds all the items
        logger.info("##### All items");
        List<Item> items = itemEJB.findAllItems();
        for (Item oneItem : items) {
            logger.info("# " + oneItem);
        }

        // Finds all the CDs
        logger.info("##### All CDs");
        List<CD> cds = itemEJB.findAllCDs();
        for (CD oneCD : cds) {
            logger.info("# " + oneCD);
        }

        // Finds all the Books
        logger.info("##### All Books");
        List<Book> books = itemEJB.findAllBooks();
        for (Book oneBook : books) {
            logger.info("# " + oneBook);
        }

        ec.close();
View Full Code Here

TOP

Related Classes of org.agoncal.training.javaee6.domain.CD

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.