Added integration-test provided by Guido Wimmel <Wimmel.Guido@swm.de>
[hibernate4-maven-plugin] / src / it / schemaexport-example / schemaexport-example-persistence-impl / src / main / java / de / test / schemaexport / persistence / dao / impl / EmployeeDAO.java
diff --git a/src/it/schemaexport-example/schemaexport-example-persistence-impl/src/main/java/de/test/schemaexport/persistence/dao/impl/EmployeeDAO.java b/src/it/schemaexport-example/schemaexport-example-persistence-impl/src/main/java/de/test/schemaexport/persistence/dao/impl/EmployeeDAO.java
new file mode 100644 (file)
index 0000000..c402a5e
--- /dev/null
@@ -0,0 +1,19 @@
+package de.test.schemaexport.persistence.dao.impl;\r
+\r
+import javax.persistence.EntityManager;\r
+\r
+import de.test.schemaexport.domain.Employee;\r
+import de.test.schemaexport.persistence.dao.IEmployeeDAO;\r
+\r
+public class EmployeeDAO implements IEmployeeDAO {\r
+\r
+       public Employee findByID(EntityManager em, long id) {\r
+               return em.find(Employee.class, id);\r
+       }\r
+\r
+       public Employee createOrUpdate(EntityManager em, Employee toCreateOrUpdate) {\r
+               return em.merge(toCreateOrUpdate);\r
+       }\r
+\r
+       \r
+}\r