3 * Copyright (C) 2015 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
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.
10 package eu
.etaxonomy
.taxeditor
.editor
;
12 import eu
.etaxonomy
.cdm
.api
.service
.IService
;
13 import eu
.etaxonomy
.cdm
.model
.common
.CdmBase
;
14 import eu
.etaxonomy
.cdm
.persistence
.hibernate
.CdmDataChangeMap
;
15 import eu
.etaxonomy
.taxeditor
.session
.ICdmEntitySession
;
16 import eu
.etaxonomy
.taxeditor
.session
.ICdmEntitySessionEnabled
;
17 import eu
.etaxonomy
.taxeditor
.store
.CdmStore
;
24 public abstract class CdmEntitySessionInput
implements ICdmEntitySessionEnabled
{
26 private final ICdmEntitySession cdmEntitySession
;
28 public CdmEntitySessionInput() {
29 cdmEntitySession
= CdmStore
.getCurrentSessionManager().newSession(this, true);
33 * @see eu.etaxonomy.cdm.persistence.hibernate.ICdmPostDataChangeObserver#update(eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap)
36 public void update(CdmDataChangeMap changeEvents
) {
42 * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getCdmEntitySession()
45 public ICdmEntitySession
getCdmEntitySession() {
46 return cdmEntitySession
;
49 public <T
extends CdmBase
> void update(IService
<T
> service
, T cdmBase
) {
50 cdmEntitySession
.remoteUpdate(service
, cdmBase
);
53 public abstract <T
extends CdmBase
> IService
<T
> getService();
55 public <T
extends CdmBase
> void update(T cdmBase
) {
56 cdmEntitySession
.remoteUpdate(getService(), cdmBase
);
60 public abstract <T
extends CdmBase
> void update();