Package org.apache.tapestry.vlib.ejb

Examples of org.apache.tapestry.vlib.ejb.IPersonHome.findByPrimaryKey()


        if (!book.getLendable())
            throw new BorrowException("Book may not be borrowed.");

        // Verify that the borrower exists.

        personHome.findByPrimaryKey(borrowerId);

        // TBD: Check that borrower has authenticated

        // findByPrimaryKey() throws an exception if the EJB doesn't exist,
        // so we're safe.
View Full Code Here


        // TBD: Check that borrower has authenticated

        // findByPrimaryKey() throws an exception if the EJB doesn't exist,
        // so we're safe.

        personHome.findByPrimaryKey(book.getOwnerId());

        // Here's the real work; just setting the holder of the book
        // to be the borrower.

        book.setHolderId(borrowerId);
View Full Code Here

    public void updatePerson(Integer personId, Map attributes)
        throws FinderException, RemoteException
    {
        IPersonHome home = getPersonHome();

        IPerson person = home.findByPrimaryKey(personId);

        person.updateEntityAttributes(attributes);
    }

    public Publisher[] getPublishers()
View Full Code Here

    public Map getPersonAttributes(Integer personId) throws FinderException, RemoteException
    {
        IPersonHome home = getPersonHome();

        IPerson person = home.findByPrimaryKey(personId);

        return person.getEntityAttributes();
    }

    /**
 
View Full Code Here

            throw new RemoteException("Must provide an owner for the books.");

        // Verify that the new owner exists.

        IPersonHome personHome = getPersonHome();
        personHome.findByPrimaryKey(newOwnerId);

        // Direct SQL would be more efficient, but this'll probably do.

        IBookHome home = getBookHome();
View Full Code Here

        int count = Tapestry.size(updated);

        for (int i = 0; i < count; i++)
        {
            Person u = updated[i];
            IPerson person = home.findByPrimaryKey(u.getId());

            person.setAdmin(u.isAdmin());
            person.setLockedOut(u.isLockedOut());
        }
View Full Code Here

        count = Tapestry.size(resetPassword);

        for (int i = 0; i < count; i++)
        {
            IPerson person = home.findByPrimaryKey(resetPassword[i]);

            person.setPassword(newPassword);
        }

        count = Tapestry.size(deleted);
View Full Code Here

        if (!book.getLendable())
            throw new BorrowException("Book may not be borrowed.");

        // Verify that the borrower exists.

        personHome.findByPrimaryKey(borrowerId);

        // TBD: Check that borrower has authenticated

        // findByPrimaryKey() throws an exception if the EJB doesn't exist,
        // so we're safe.
View Full Code Here

        // TBD: Check that borrower has authenticated

        // findByPrimaryKey() throws an exception if the EJB doesn't exist,
        // so we're safe.

        personHome.findByPrimaryKey(book.getOwnerId());

        // Here's the real work; just setting the holder of the book
        // to be the borrower.

        book.setHolderId(borrowerId);
View Full Code Here

    public void updatePerson(Integer personId, Map attributes)
        throws FinderException, RemoteException
    {
        IPersonHome home = getPersonHome();

        IPerson person = home.findByPrimaryKey(personId);

        person.updateEntityAttributes(attributes);
    }

    public Publisher[] getPublishers()
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.