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