Package org.springframework.test.context.transaction.ejb.model

Examples of org.springframework.test.context.transaction.ejb.model.TestEntity


  @PersistenceContext
  protected EntityManager entityManager;


  protected final TestEntity getTestEntity(String name) {
    TestEntity te = entityManager.find(TestEntity.class, name);
    if (te == null) {
      te = new TestEntity(name, 0);
      entityManager.persist(te);
    }
    return te;
  }
View Full Code Here


  protected final int getCountInternal(String name) {
    return getTestEntity(name).getCount();
  }

  protected final int incrementCountInternal(String name) {
    TestEntity te = getTestEntity(name);
    int count = te.getCount();
    count++;
    te.setCount(count);
    return count;
  }
View Full Code Here

TOP

Related Classes of org.springframework.test.context.transaction.ejb.model.TestEntity

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.