2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
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.
9 package eu
.etaxonomy
.taxeditor
.annotatedlineeditor
;
11 import eu
.etaxonomy
.cdm
.api
.service
.config
.DeleteConfiguratorBase
;
12 import eu
.etaxonomy
.cdm
.api
.service
.exception
.ReferencedObjectUndeletableException
;
15 * Performs the retrieving and saving of a list of entities edited by a <code>ListEditor</code>,
16 * interacting with the persistence layer.
18 * The methods' element input parameter is typically the <code>ListEditor</code>'s <code>IEditorInput</code>.
23 public interface IEntityPersistenceService
<T
> {
29 public T
create(T entity
);
34 * @param entity a {@link java.lang.Object} object.
37 public T
save(T entity
);
42 * @param entity a {@link java.lang.Object} object.
43 * @param mergeTarget a {@link java.lang.Object} object.
46 public boolean merge(T entity
, T mergeTarget
);
51 * @param entity a {@link java.lang.Object} object.
53 * @throws ReferencedObjectUndeletableException
55 public boolean delete(T entity
, DeleteConfiguratorBase config
) throws ReferencedObjectUndeletableException
;