Examples of findByPrimaryKey()


Examples of com.titan.cabin.CabinHomeLocal.findByPrimaryKey()

            Vector vect = new Vector();
            for (int i = 1; ; i++) {
              Integer pk = new Integer(i);
              CabinLocal cabin = null;
              try {
                  cabin = home.findByPrimaryKey(pk);
                } catch(javax.ejb.FinderException fe) {
                    System.out.println("Caught exception: "+fe.getMessage()+" for pk="+i);

                    break;
                }
View Full Code Here

Examples of com.titan.cabin.CabinHomeRemote.findByPrimaryKey()

            // Add 10 cabins to deck 4 of ship 3.
            makeCabins(home, 91, 100, 4, 3);

            for (int i = 1; i <= 100; i++){
                Integer pk = new Integer(i);
                CabinRemote cabin = home.findByPrimaryKey(pk);
                System.out.println("PK = "+i+", Ship = "+cabin.getShipId()
                  + ", Deck = "+cabin.getDeckLevel()
                  + ", BedCount = "+cabin.getBedCount()
                  + ", Name = "+cabin.getName());
            }
View Full Code Here

Examples of com.titan.customer.CustomerHomeLocal.findByPrimaryKey()

        try {
            Integer primKey = (Integer)customer.getPrimaryKey();
            javax.naming.Context jndiContext = new InitialContext();
            CustomerHomeLocal home = (CustomerHomeLocal)
                jndiContext.lookup("java:comp/env/ejb/CustomerHomeLocal")// get local interface
            CustomerLocal custL = home.findByPrimaryKey(primKey);
      // Our bean has many customers, use the cmr set method here..
      Set customers = new HashSet();
      customers.add(custL);
      this.setCustomers(customers);
        } catch (RemoteException re) {
View Full Code Here

Examples of com.titan.customer.CustomerHomeRemote.findByPrimaryKey()

            }

            // find and remove Customers
            for(int i = 0; i < args.length; i+=3) { 
                Integer primaryKey = new Integer(args[i]);
                CustomerRemote customer = home.findByPrimaryKey(primaryKey);
                String lastName = customer.getLastName( );
                String firstName = customer.getFirstName( );
                System.out.print(primaryKey+" = ");
                System.out.println(firstName+" "+lastName);
View Full Code Here

Examples of de.danet.an.workflow.ejbs.admin.ConfigurationHome.findByPrimaryKey()

    try {
        ConfigurationHome ch
      = (ConfigurationHome)EJBUtil.lookupEJBHome
        (ConfigurationHome.class, confHome);
        Configuration conf
      = (Configuration)ch.findByPrimaryKey(new Integer(0));
        // first get all data ...
        Handle handle = conf.getHandle();
        String installationId = conf.workflowEngineInstanceKey();
        // ... now change all cached information
        // (prevents incomplete initialization)
View Full Code Here

Examples of org.apache.openejb.test.entity.cmr.cmrmapping.ManyOwningSideLocalHome.findByPrimaryKey()

        return manyOwningSideLocal;
    }

    private ManyOwningSideLocal findManyOwningSide(Integer id) throws Exception {
        ManyOwningSideLocalHome home = manyHome;
        return home.findByPrimaryKey(id);
    }

    private void validateOneToManyRelationship() throws NotSupportedException, SystemException, Exception, HeuristicMixedException, HeuristicRollbackException, RollbackException {
        try {
            OneInverseSideLocal inverseLocal = findOneInverseSide(compoundPK_20_10_field1);
View Full Code Here

Examples of org.apache.openejb.test.entity.cmr.cmrmapping.OneInverseSideLocalHome.findByPrimaryKey()

        return oneInverseSideLocal;
    }

    private OneInverseSideLocal findOneInverseSide(Integer id) throws Exception {
        OneInverseSideLocalHome home = oneInverseHome;
        return home.findByPrimaryKey(id);
    }

    private void validateOneToOneRelationship() throws Exception {
        try {
            OneInverseSideLocal inverseLocal = findOneInverseSide(compoundPK_20_10_field1);
View Full Code Here

Examples of org.apache.openejb.test.entity.cmr.cmrmapping.OneOwningSideLocalHome.findByPrimaryKey()

        return oneOwningSideLocal;
    }

    private OneOwningSideLocal findOneOwningSide(Integer id) throws Exception {
        OneOwningSideLocalHome home = oneOwningHome;
        return home.findByPrimaryKey(id);
    }

    private ManyOwningSideLocal createManyOwningSide(Integer id, Integer field1) throws Exception {
        ManyOwningSideLocalHome home = manyHome;
        ManyOwningSideLocal manyOwningSideLocal = home.create(id, field1);
View Full Code Here

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

    public void updateBook(Integer bookId, Map attributes) throws FinderException, RemoteException
    {
        IBookHome bookHome = getBookHome();

        IBook book = bookHome.findByPrimaryKey(bookId);

        book.updateEntityAttributes(attributes);
    }

    /**
 
View Full Code Here

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
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.