Package org.jboss.test.cmp2.keygen.ejb

Examples of org.jboss.test.cmp2.keygen.ejb.IntegerPKLocalHome.findByPrimaryKey()


    public void rearrangeNodes()
    {
        try
        {
            TreeLocalHome tlh = getTreeLocalHome();
            TreeLocal target = tlh.findByPrimaryKey("Child 2");
            TreeLocal sibling = null;
            sibling = tlh.findByPrimaryKey("Child 1");
            /*
            TreeLocal parent = tlh.findByPrimaryKey("Parent");
            Collection coll = parent.getMenuChildren();
View Full Code Here


        try
        {
            TreeLocalHome tlh = getTreeLocalHome();
            TreeLocal target = tlh.findByPrimaryKey("Child 2");
            TreeLocal sibling = null;
            sibling = tlh.findByPrimaryKey("Child 1");
            /*
            TreeLocal parent = tlh.findByPrimaryKey("Parent");
            Collection coll = parent.getMenuChildren();
            Iterator iter = coll.iterator();
            sibling = (TreeLocal) iter.next();
View Full Code Here

         {
            e.printStackTrace();
         }

         beginTx();
         a = ah.findByPrimaryKey(id);
         a.setIntField(3);
         commitTx();

         sleepUntilEvicted();
         assertTrue(cacheListener.lastEvicted - lastEvicted >= maxAgeMs + 1000);
View Full Code Here

   {
      beginTx();
      try
      {
         ALocalHome ah = AUtil.getLocalHome();
         ALocal a = ah.findByPrimaryKey(id);
         assertEquals(value, a.getIntField());
      }
      finally
      {
         commitTx();
View Full Code Here

         {
            e.printStackTrace();
         }

         beginTx();
         a = ah.findByPrimaryKey(id);
         a.setIntField(3);
         commitTx();

         sleepUntilEvicted();
         assertTrue(cacheListener.lastEvicted - lastEvicted >= maxAgeMs + 1000);
View Full Code Here

   {
      beginTx();
      try
      {
         ALocalHome ah = AUtil.getLocalHome();
         ALocal a = ah.findByPrimaryKey(id);
         assertEquals(value, a.getIntField());
      }
      finally
      {
         commitTx();
View Full Code Here

      UnknownPKLocal ejb1 = home.create("testHsqldbIntegerKeyGenerator");
      UnknownPKLocal ejb2 = home.create("testHsqldbIntegerKeyGenerator");
      try
      {
         Integer key = (Integer) ejb1.getPrimaryKey();
         UnknownPKLocal ejb1a = home.findByPrimaryKey(key);
         assertTrue(ejb1.isIdentical(ejb1a));
         assertTrue(ejb1.isIdentical(ejb2) == false);
         assertTrue(ejb1.getPrimaryKey().equals(ejb2.getPrimaryKey()) == false);
      }
      finally
View Full Code Here

      UnknownPKLocalHome home = getUnknownPKHome("local/TestHsqldbEJB");
      UnknownPKLocal ejb1 = home.create("testHsqldbKeyGenerator");
      UnknownPKLocal ejb2 = home.create("testHsqldbKeyGenerator");
      try
      {
         UnknownPKLocal ejb1a = home.findByPrimaryKey(ejb1.getPrimaryKey());
         assertTrue(ejb1.isIdentical(ejb1a));
         assertTrue(ejb1.isIdentical(ejb2) == false);
         assertTrue(ejb1.getPrimaryKey().equals(ejb2.getPrimaryKey()) == false);
      }
      finally
View Full Code Here

      UnknownPKLocalHome home = getUnknownPKHome("local/TestOtherEJB");
      UnknownPKLocal ejb1 = home.create("testOtherKeyGenerator1");
      UnknownPKLocal ejb2 = home.create("testOtherKeyGenerator2");
      try
      {
         UnknownPKLocal ejb1a = home.findByPrimaryKey(ejb1.getPrimaryKey());
         assertTrue(ejb1.isIdentical(ejb1a));
         assertEquals("testOtherKeyGenerator1", ejb1a.getValue());
         assertTrue(ejb1.isIdentical(ejb2) == false);
         assertTrue(ejb1.getPrimaryKey().equals(ejb2.getPrimaryKey()) == false);
      }
View Full Code Here

      UnknownPKLocalHome home = getUnknownPKHome("local/TestUUIDKeyGenEJB");
      UnknownPKLocal ejb1 = home.create("testUUIDKeyGenerator");
      UnknownPKLocal ejb2 = home.create("testUUIDKeyGenerator");
      try
      {
         UnknownPKLocal ejb1a = home.findByPrimaryKey(ejb1.getPrimaryKey());
         assertTrue(ejb1.isIdentical(ejb1a));
         assertTrue(ejb1.isIdentical(ejb2) == false);
         assertTrue(ejb1.getPrimaryKey().equals(ejb2.getPrimaryKey()) == false);
      }
      finally
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.