use of org.apache.tapestry5.jpa.annotations.CommitAfter in project tapestry-5 by apache.
the class GridDemo method onActionFromSetup.
@CommitAfter
@PersistenceContext(unitName = AppConstants.TEST_PERSISTENCE_UNIT)
void onActionFromSetup() {
userDAO.deleteAll();
for (int i = 1; i <= 20; i++) {
final User user = new User();
final String suffix = String.valueOf(i);
user.setFirstName("Joe_" + suffix);
user.setLastName("User");
user.setEncodedPassword("####");
user.setEmail("joe" + suffix + "@null.com");
entityManager.persist(user);
}
}
use of org.apache.tapestry5.jpa.annotations.CommitAfter in project tapestry-5 by apache.
the class PersistAll method onCreateUser.
@CommitAfter
void onCreateUser() {
final User user = new User();
user.setFirstName("Foo User");
entityManager.persist(user);
this.user = user;
}
use of org.apache.tapestry5.jpa.annotations.CommitAfter in project tapestry-5 by apache.
the class PersistAll method onCreateItem.
@CommitAfter
void onCreateItem() {
final Item item = new Item();
item.setName("Bar Item");
entityManager.persist(item);
this.item = item;
}
use of org.apache.tapestry5.jpa.annotations.CommitAfter in project tapestry-5 by apache.
the class PersistItem method onCreateEntity.
@CommitAfter
void onCreateEntity() {
final Item item = new Item();
item.setName("name");
entityManager.persist(item);
this.item = item;
}
use of org.apache.tapestry5.jpa.annotations.CommitAfter in project tapestry-5 by apache.
the class PersistItem2 method onCreateEntity.
@CommitAfter
void onCreateEntity() {
final Item item = new Item();
item.setName("name");
entityManager.persist(item);
this.item = item;
}
Aggregations