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 / DepartmentDAO.java
diff --git a/src/it/schemaexport-example/schemaexport-example-persistence-impl/src/main/java/de/test/schemaexport/persistence/dao/impl/DepartmentDAO.java b/src/it/schemaexport-example/schemaexport-example-persistence-impl/src/main/java/de/test/schemaexport/persistence/dao/impl/DepartmentDAO.java
new file mode 100644 (file)
index 0000000..e7f91dd
--- /dev/null
@@ -0,0 +1,17 @@
+package de.test.schemaexport.persistence.dao.impl;\r
+\r
+import javax.persistence.EntityManager;\r
+import de.test.schemaexport.domain.Department;\r
+import de.test.schemaexport.persistence.dao.IDepartmentDAO;\r
+\r
+public class DepartmentDAO implements IDepartmentDAO {\r
+\r
+       public Department findByID(EntityManager em, long id) {\r
+               return em.find(Department.class, id);\r
+       }\r
+\r
+       public Department createOrUpdate(EntityManager em, Department toCreateOrUpdate) {\r
+               return em.merge(toCreateOrUpdate);\r
+       }\r
+\r
+}\r