Search in sources :

Example 1 with Item

use of org.example.app2.entities.Item 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;
}
Also used : Item(org.example.app2.entities.Item) CommitAfter(org.apache.tapestry5.jpa.annotations.CommitAfter)

Example 2 with Item

use of org.example.app2.entities.Item 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;
}
Also used : Item(org.example.app2.entities.Item) CommitAfter(org.apache.tapestry5.jpa.annotations.CommitAfter)

Example 3 with Item

use of org.example.app2.entities.Item 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;
}
Also used : Item(org.example.app2.entities.Item) CommitAfter(org.apache.tapestry5.jpa.annotations.CommitAfter)

Example 4 with Item

use of org.example.app2.entities.Item in project tapestry-5 by apache.

the class PersistItem3 method onCreateEntity.

@CommitAfter
void onCreateEntity() {
    final Item item = new Item();
    item.setName("name");
    dao.persist(item);
    this.item = item;
}
Also used : Item(org.example.app2.entities.Item) CommitAfter(org.apache.tapestry5.jpa.annotations.CommitAfter)

Aggregations

CommitAfter (org.apache.tapestry5.jpa.annotations.CommitAfter)4 Item (org.example.app2.entities.Item)4