Package model

Examples of model.Author


    @TransactionAttribute(TransactionAttributeType.SUPPORTS)
    public void fillLibrary() {
        if (getNumBooks() != 0) {
            return;
        }
        Author mann = createAuthor("Thomas", "Mann");
        Author steinbeck = createAuthor("John", "Steinbeck");

        createBook("Buddenbrooks", mann);
        createBook("East of Eden", steinbeck);
    }
View Full Code Here


        return books;
    }

    @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
    public Author createAuthor(String firstName, String lastName) {
        Author author = new Author();
        author.setFirstName(firstName);
        author.setLastName(lastName);
        em.persist(author);
        return author;
    }
View Full Code Here

TOP

Related Classes of model.Author

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.