01: package org.compass.gps.device.jpa.openjpa;
02:
03: import java.util.HashMap;
04: import javax.persistence.EntityManagerFactory;
05:
06: import org.apache.openjpa.persistence.PersistenceProviderImpl;
07: import org.compass.gps.device.jpa.AbstractSimpleJpaGpsDeviceTests;
08: import org.compass.gps.device.jpa.JpaGpsDevice;
09:
10: /**
11: * Performs JPA tests using OpenJPA specific support.
12: *
13: * @author kimchy
14: */
15: public class OpenJPASimpleJpaGpsDeviceTests extends
16: AbstractSimpleJpaGpsDeviceTests {
17:
18: @Override
19: protected void addDeviceSettings(JpaGpsDevice device) {
20: device.setInjectEntityLifecycleListener(true);
21: }
22:
23: protected EntityManagerFactory doSetUpEntityManagerFactory() {
24: return new PersistenceProviderImpl()
25: .createEntityManagerFactory("openjpa", new HashMap());
26: }
27: }
|