Package org.apache.tapestry.vlib.ejb

Examples of org.apache.tapestry.vlib.ejb.Book


        VirtualLibraryEngine vengine = (VirtualLibraryEngine) getEngine();
        IOperations operations = vengine.getOperations();

        try
        {
            Book book = operations.returnBook(bookPK);

            setMessage(format("returned-book", book.getTitle()));

            runQuery();
        }
        catch (FinderException ex)
        {
View Full Code Here


        while (true)
        {
            try
            {
                IOperations operations = vengine.getOperations();
                Book book = operations.returnBook(bookId);

                setMessage(format("returned-book", book.getTitle()));

                break;
            }
            catch (FinderException ex)
            {
View Full Code Here

    public void selectBook(Integer bookId)
    {
        setBookId(bookId);

        Book book = getRemoteTemplate().getBook(bookId);

        setBookTitle(book.getTitle());

        getRequestCycle().activate(this);
    }
View Full Code Here

                    throw new ApplicationRuntimeException(ex);
                }
            }
        };

        Book book = getRemoteTemplate().execute(callback, "Error deleting book #" + bookId + ".");

        MyLibrary myLibrary = getMyLibrary();

        myLibrary.setMessage(bookDeleted(book.getTitle()));

        myLibrary.activate();
    }
View Full Code Here

    public void returnBook(Integer bookPK)
    {
        try
        {
            Book book = getOperations().returnBook(bookPK);

            setMessage(returnedBook(book.getTitle()));

            runQuery();
        }
        catch (FinderException ex)
        {
View Full Code Here

    public void testGetBook() throws Exception
    {
        Integer bookId = new Integer(33);

        IOperations operations = newOperations();
        Book book = new Book(new Object[Book.N_COLUMNS]);

        operations.getBook(bookId);
        setReturnValue(operations, book);

        replayControls();
View Full Code Here

        Timestamp lastAccess = null;

        if (getVisitExists())
            lastAccess = getVisitState().getLastAccess();

        Book book = getBook();

        Timestamp dateAdded = book.getDateAdded();

        // Some old records may not contain a value for dateAdded

        if (dateAdded == null)
            return false;
View Full Code Here

    private void readBook()
    {
        // This doesn't handle invalid book id as nicely as the 3.0 code did, but I'm
        // getting a bit lazy!

        Book book = getRemoteTemplate().getBook(getBookId());

        setBook(book);
    }
View Full Code Here

            return true;

        // If the user is logged in, they can borrow it if they are
        // not already holding it and aren't the owner.

        Book book = getBook();

        // If the book is not lendable, then disable the link.

        if (!book.isLendable())
            return true;

        // Otherwise, disabled the link if already holding it.

        return visit.isLoggedInUser(book.getHolderId());
    }
View Full Code Here

                    throw new ApplicationRuntimeException(ex);
                }
            }
        };

        Book book = getRemoteTemplate().execute(callback, "Error borrowing book.");

        if (book == null)
            return null;

        Home home = getHome();

        home.setMessage(borrowedBook(book.getTitle()));

        return home;
    }
View Full Code Here

TOP

Related Classes of org.apache.tapestry.vlib.ejb.Book

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.