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

    {
        Connection connection = null;
        IStatement statement = null;
        ResultSet set = null;

        Book result = null;

        try
        {
            connection = getConnection();
View Full Code Here

    }

    public Book deleteBook(Integer bookId) throws RemoveException, RemoteException
    {
        IBookHome home = getBookHome();
        Book result = null;

        try
        {
            result = getBook(bookId);
        }
View Full Code Here

        columns[Book.AUTHOR_COLUMN] = set.getString(column++);
        columns[Book.HIDDEN_COLUMN] = getBoolean(set, column++);
        columns[Book.LENDABLE_COLUMN] = getBoolean(set, column++);
        columns[Book.DATE_ADDED_COLUMN] = set.getTimestamp(column++);

        return new Book(columns);
    }
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

    {
        Connection connection = null;
        IStatement statement = null;
        ResultSet set = null;

        Book result = null;

        try
        {
            connection = getConnection();
View Full Code Here

    }

    public Book deleteBook(Integer bookId) throws RemoveException, RemoteException
    {
        IBookHome home = getBookHome();
        Book result = null;

        try
        {
            result = getBook(bookId);
        }
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.