Merge branch 'develop' into remoting-4.0
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / editor / CdmEntitySessionInput.java
1 // $Id$
2 /**
3 * Copyright (C) 2015 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
6 *
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
9 */
10 package eu.etaxonomy.taxeditor.editor;
11
12 import java.util.List;
13 import java.util.Map;
14
15 import eu.etaxonomy.taxeditor.session.ICdmEntitySession;
16 import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
17 import eu.etaxonomy.taxeditor.store.CdmStore;
18
19 /**
20 * @author cmathew
21 * @date 5 Feb 2015
22 *
23 */
24 public abstract class CdmEntitySessionInput implements ICdmEntitySessionEnabled {
25
26 private ICdmEntitySession cdmEntitySession;
27
28 public CdmEntitySessionInput(boolean init) {
29 if(init) {
30 initSession();
31 }
32 }
33
34 protected void initSession() {
35 cdmEntitySession = CdmStore.getCurrentSessionManager().newSession(this, true);
36 }
37
38 @Override
39 public ICdmEntitySession getCdmEntitySession() {
40 return cdmEntitySession;
41 }
42
43 public void bind() {
44 cdmEntitySession.bind();
45 }
46
47 public void dispose() {
48 cdmEntitySession.dispose();
49 }
50
51 public abstract void merge();
52
53
54 /* (non-Javadoc)
55 * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getPropertyPathsMap()
56 */
57 @Override
58 public Map<Object, List<String>> getPropertyPathsMap() {
59 // TODO Auto-generated method stub
60 return null;
61 }
62
63 }