1 package com.genimen.djeneric.test.strong.impl; 2 3 import com.genimen.djeneric.repository.DjMessenger; 4 import com.genimen.djeneric.repository.DjRepositoryDescriptor; 5 import com.genimen.djeneric.repository.DjSession; 6 import com.genimen.djeneric.repository.exceptions.DjenericException; 7 import com.genimen.djeneric.repository.rdbms.RdbmsPersistenceManager; 8 import com.genimen.djeneric.test.strong.TestException; 9 import com.genimen.djeneric.test.strong.TestSession; 10 11 15 public class TestPersistenceManager extends RdbmsPersistenceManager 16 { 17 public TestPersistenceManager(DjRepositoryDescriptor rdesc) throws DjenericException 18 { 19 super(null, rdesc); 20 } 21 22 public TestPersistenceManager(DjMessenger msg, DjRepositoryDescriptor rdesc, String repositoryUser, 23 String repositoryPassword) throws DjenericException 24 { 25 super(msg, rdesc, repositoryUser, repositoryPassword); 26 } 27 28 public DjSession createSession() throws TestException 29 { 30 try 31 { 32 TestSessionImpl ses = new TestSessionImpl(this); 33 ses.setCommitAllowed(isCommitAllowed()); 34 35 return ses; 36 } 37 catch (Exception x) 38 { 39 throw new TestException(x); 40 } 41 } 42 43 public TestSession createTestSession() throws TestException 44 { 45 return (TestSessionImpl) createSession(); 46 } 47 48 } | Popular Tags |