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
1 package de.test.schemaexport.persistence.dao.impl;\r
2 \r
3 import javax.persistence.EntityManager;\r
4 import de.test.schemaexport.domain.Department;\r
5 import de.test.schemaexport.persistence.dao.IDepartmentDAO;\r
6 \r
7 public class DepartmentDAO implements IDepartmentDAO {\r
8 \r
9         public Department findByID(EntityManager em, long id) {\r
10                 return em.find(Department.class, id);\r
11         }\r
12 \r
13         public Department createOrUpdate(EntityManager em, Department toCreateOrUpdate) {\r
14                 return em.merge(toCreateOrUpdate);\r
15         }\r
16 \r
17 }\r