Search in sources :

Example 1 with Thang

use of org.example.app6.entities.Thang in project tapestry-5 by apache.

the class PersistThang method onCreateEntity.

@CommitAfter
@PersistenceContext(unitName = TEST_PERSISTENCE_UNIT_2)
void onCreateEntity() {
    final Thang thang = new Thang();
    thang.setName("name");
    entityManager.persist(thang);
    this.thang = thang;
}
Also used : Thang(org.example.app1.entities.Thang) PersistenceContext(javax.persistence.PersistenceContext) CommitAfter(org.apache.tapestry5.jpa.annotations.CommitAfter)

Example 2 with Thang

use of org.example.app6.entities.Thang in project tapestry-5 by apache.

the class PersistAll method onCreateThang.

@CommitAfter
void onCreateThang() {
    final Thang thang = new Thang();
    thang.setName("Baz Thang");
    entityManager.persist(thang);
    this.thang = thang;
}
Also used : Thang(org.example.app1.entities.Thang) CommitAfter(org.apache.tapestry5.jpa.annotations.CommitAfter)

Example 3 with Thang

use of org.example.app6.entities.Thang in project tapestry-5 by apache.

the class PersistThang method onCreateEntity.

@CommitAfter
@PersistenceContext(unitName = TEST_PERSISTENCE_UNIT_2)
void onCreateEntity() {
    final Thang thang = new Thang();
    thang.setName("name");
    entityManager.persist(thang);
    this.thang = thang;
}
Also used : Thang(org.example.app6.entities.Thang) PersistenceContext(javax.persistence.PersistenceContext) CommitAfter(org.apache.tapestry5.jpa.annotations.CommitAfter)

Aggregations

CommitAfter (org.apache.tapestry5.jpa.annotations.CommitAfter)3 PersistenceContext (javax.persistence.PersistenceContext)2 Thang (org.example.app1.entities.Thang)2 Thang (org.example.app6.entities.Thang)1