Package org.apache.tapestry.vlib.ejb

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


        Timestamp lastAccess = null;

        if (visit != null)
            lastAccess = visit.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


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

                setBookTitle(book.getTitle());

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

    {
        Object[] parameters = cycle.getServiceParameters();
        Integer bookPK = (Integer) parameters[0];

        VirtualLibraryEngine vengine = (VirtualLibraryEngine) getEngine();
        Book book = null;

        int i = 0;
        while (true)
        {
            try
            {
                IOperations operations = vengine.getOperations();

                book = operations.deleteBook(bookPK);

                break;
            }
            catch (RemoveException ex)
            {
                throw new ApplicationRuntimeException(ex);
            }
            catch (RemoteException ex)
            {
                vengine.rmiFailure("Remote exception deleting book #" + bookPK + ".", ex, i++);
            }
        }

        MyLibrary myLibrary = (MyLibrary) cycle.getPage("MyLibrary");

        myLibrary.setMessage(format("book-deleted", book.getTitle()));

        myLibrary.activate(cycle);
    }
View Full Code Here

        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.getBook(bookId);

                setBookTitle(book.getTitle());

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

     */

    public void deleteBook(Integer bookPK)
    {
        VirtualLibraryEngine vengine = (VirtualLibraryEngine) getEngine();
        Book book = null;

        int i = 0;
        while (true)
        {
            try
            {
                IOperations operations = vengine.getOperations();

                book = operations.deleteBook(bookPK);

                break;
            }
            catch (RemoveException ex)
            {
                throw new ApplicationRuntimeException(ex);
            }
            catch (RemoteException ex)
            {
                vengine.rmiFailure("Remote exception deleting book #" + bookPK + ".", ex, i++);
            }
        }

        MyLibrary myLibrary = getMyLibrary();

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

        myLibrary.activate();
    }
View Full Code Here

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

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

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

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

        List list = new ArrayList();
        Object[] columns = new Object[Book.N_COLUMNS];

        while (set.next())
        {
            Book book = convertRowToBook(set, columns);

            list.add(book);
        }

        _results = new Book[list.size()];
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

    {
        // 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

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.