1 package org.minetti.astrodevice.server.hibernate.dao;
2
3 import javax.persistence.EntityManager;
4 import org.minetti.astrodevice.server.core.dao.DaoSession;
5
6
7
8
9
10 public final class DaoSessionImpl
11 implements DaoSession {
12
13
14
15
16 private final EntityManager entityManager;
17
18
19
20
21
22
23 protected DaoSessionImpl (final EntityManager entityManager) {
24 super();
25 this.entityManager = entityManager;
26 }
27
28
29
30
31
32 protected EntityManager getEntityManager () {
33 return this.entityManager;
34 }
35
36
37
38
39
40 public void close () {
41 this.entityManager.close();
42 }
43
44
45
46
47
48 @Override
49 public String toString () {
50 return "DaoSessionImpl[entityManager=" + this.entityManager + "]";
51 }
52
53 }