1
|
package eu.etaxonomy.taxeditor.session;
|
2
|
|
3
|
import java.util.Collection;
|
4
|
|
5
|
import eu.etaxonomy.cdm.api.service.IService;
|
6
|
import eu.etaxonomy.cdm.model.common.CdmBase;
|
7
|
|
8
|
public interface ICdmEntitySessionManager {
|
9
|
|
10
|
public abstract ICdmEntitySession getActiveSession();
|
11
|
|
12
|
public abstract ICdmEntitySession getSession(
|
13
|
ISessionEventListener sessionOwner);
|
14
|
|
15
|
public abstract void bind(ISessionEventListener sessionOwner);
|
16
|
|
17
|
public abstract <T extends Object> T load(
|
18
|
ISessionEventListener sessionOwner, T obj);
|
19
|
|
20
|
public abstract <T extends Object> T load(T obj);
|
21
|
|
22
|
public abstract <T extends CdmBase> T load(
|
23
|
ISessionEventListener sessionOwner, T cdmBase);
|
24
|
|
25
|
public abstract <T extends CdmBase> T load(T cdmBase);
|
26
|
|
27
|
public abstract <T extends CdmBase> Collection<T> load(
|
28
|
ISessionEventListener sessionOwner, Collection<T> cdmBaseList);
|
29
|
|
30
|
public abstract <T extends CdmBase> Collection<T> load(
|
31
|
Collection<T> cdmBaseList);
|
32
|
|
33
|
public abstract void dispose(ISessionEventListener owner);
|
34
|
|
35
|
//FIXME:Remoting would be nice to have these methods working,
|
36
|
// but they can only be useful if we can 'intelligently'
|
37
|
// get from a model class to the correspoding service class
|
38
|
|
39
|
// @SuppressWarnings("unchecked")
|
40
|
// public abstract <T extends CdmBase> void addRootEntity(T cdmBase);
|
41
|
//
|
42
|
// @SuppressWarnings("unchecked")
|
43
|
// public abstract <T extends Object> void addRootEntities(
|
44
|
// Collection<T> cdmBaseList);
|
45
|
|
46
|
// public abstract void commit();
|
47
|
//
|
48
|
// public abstract void commit(ISessionEventListener sessionOwner);
|
49
|
//
|
50
|
// public abstract void commit(IService service, CdmBase cdmBase);
|
51
|
|
52
|
|
53
|
|
54
|
}
|