KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jbpm > identity > IdentityDbTestCase


1 package org.jbpm.identity;
2
3 import org.jbpm.db.*;
4 import org.jbpm.identity.hibernate.*;
5
6 public class IdentityDbTestCase extends AbstractDbTestCase {
7   
8   protected IdentitySession identitySession = null;
9   
10   protected void beginSessionTransaction() {
11     super.beginSessionTransaction();
12     identitySession = new IdentitySession(jbpmSession.getSession());
13   }
14
15   protected User saveAndReload(User user) {
16     identitySession.saveUser(user);
17     newTransaction();
18     return identitySession.loadUser(user.getId());
19   }
20
21   protected Group saveAndReload(Group group) {
22     identitySession.saveGroup(group);
23     newTransaction();
24     return identitySession.loadGroup(group.getId());
25   }
26 }
27
Popular Tags