Package org.jboss.test.cmp2.optimisticlock.interfaces

Examples of org.jboss.test.cmp2.optimisticlock.interfaces.CmpEntityLocal


   }

   public void testSelectColors() throws Exception
   {
      Facade facade = FacadeUtil.getHome().create();
      IDClass[] ids = new IDClass[]{new IDClass(555), new IDClass(666), new IDClass(777)};

      try
      {
         facade.createChild(ids[0]);
         ColorEnum min = ColorEnum.RED.valueOf(0);
View Full Code Here


   }

   public void testSelectColor() throws Exception
   {
      Facade facade = FacadeUtil.getHome().create();
      IDClass childId = new IDClass(6);
      facade.createChild(childId);
      try
      {
         facade.setColor(childId, ColorEnum.RED);
         ColorEnum color = facade.selectColor(childId);
View Full Code Here

   // Tests

   public void testMain() throws Throwable
   {
      ALocal a = getALocalHome().findByPrimaryKey(new Long(1));
      int storeCount = a.getStoreCount().intValue();
      a.setIntField(new Integer(a.getIntField().intValue() + 1));
      assertEquals(storeCount + 1, a.getStoreCount().intValue());     
   }
View Full Code Here

   }

   public void testCorrectView() throws Throwable
   {
      BLocal b = getBLocalHome().create(new Long(11), "test");
      ALocal a = getALocalHome().findByPrimaryKey(new Long(1));
   }
View Full Code Here

      assertEquals(storeCount + 1, a.getStoreCount().intValue());     
   }

   public void testCorrectView() throws Throwable
   {
      BLocal b = getBLocalHome().create(new Long(11), "test");
      ALocal a = getALocalHome().findByPrimaryKey(new Long(1));
   }
View Full Code Here

   public void safeRemove(String jndiName, Integer id) throws Exception
   {
      log.debug("safeRemove> jndiName=" + jndiName + ", id=" + id);
      try
      {
         CmpEntityLocal entity = getCmpEntityHome(jndiName).findByPrimaryKey(id);
         entity.remove();
      }
      catch(FinderException e){}
   }
View Full Code Here

    * @ejb.interface-method
    */
   public void testNullLockedFields(String jndiName, Integer id) throws Exception
   {
      log.debug("testNullLockedFields> begin");
      CmpEntityLocal entity = getCmpEntityHome(jndiName).findByPrimaryKey(id);
      entity.setDoubleGroup1(new Double(11.11));
      entity.setDoubleGroup2(new Double(22.22));
      entity.setIntegerGroup1(new Integer(11));
      entity.setIntegerGroup2(new Integer(22));
      entity.setStringGroup1("str1 modified in testNullLockedFields");
      entity.setStringGroup2("str2 modified in testNullLockedFields");
      log.debug("testNullLockedFields> done");
   }
View Full Code Here

    * @ejb.interface-method
    */
   public void testKeygenStrategyPass(String jndiName, Integer id) throws Exception
   {
      log.debug("testKeygenStrategyPass> begin");
      CmpEntityLocal entity = getCmpEntityHome(jndiName).findByPrimaryKey(id);
      entity.setIntegerGroup1(new Integer(111));
      entity.setStringGroup2("modified in testKeygenStrategyPass");
      entity.getDoubleGroup1();
      log.debug("testKeygenStrategyPass> done");
   }
View Full Code Here

    * @ejb.interface-method
    */
   public void testKeygenStrategyFail(String jndiName, Integer id) throws Exception
   {
      log.debug("testKeygenStrategyFail> begin");
      CmpEntityLocal entity = getCmpEntityHome(jndiName).findByPrimaryKey(id);
      entity.setIntegerGroup1(new Integer(111));
      entity.setStringGroup2("modified in testKeygenStrategyFail");
      entity.getDoubleGroup1();
      myHome.create().modifyGroup1InRequiresNew(jndiName, id);
      log.debug("testKeygenStrategyFail> done");
   }
View Full Code Here

    * @ejb.interface-method
    */
   public void testTimestampStrategyPass(String jndiName, Integer id) throws Exception
   {
      log.debug("testTimestampStrategyPass> begin");
      CmpEntityLocal entity = getCmpEntityHome(jndiName).findByPrimaryKey(id);
      entity.setIntegerGroup1(new Integer(111));
      entity.setStringGroup2("modified in testTimestampStrategyPass");
      entity.getDoubleGroup1();
      log.debug("testTimestampStrategyPass> done");
   }
View Full Code Here

TOP

Related Classes of org.jboss.test.cmp2.optimisticlock.interfaces.CmpEntityLocal

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.