automated build configuration is on its way
[taxeditor.git] / taxeditor-bulkeditor / src / main / java / eu / etaxonomy / taxeditor / annotatedlineeditor / IEntityPersistenceService.java
1 // $Id$
2 /**
3 * Copyright (C) 2007 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
11 package eu.etaxonomy.taxeditor.annotatedlineeditor;
12
13
14 /**
15 * Performs the retrieving and saving of a list of entities edited by a <code>ListEditor</code>,
16 * interacting with the persistence layer.
17 * <p>
18 * The methods' element input parameter is typically the <code>ListEditor</code>'s <code>IEditorInput</code>.
19 *
20 * @author p.ciardelli
21 * @created 07.07.2009
22 * @version 1.0
23 */
24 public interface IEntityPersistenceService<T> {
25
26 /**
27 * <p>create</p>
28 *
29 * @param entity a {@link java.lang.Object} object.
30 * @return a boolean.
31 */
32 boolean create(T entity);
33
34 /**
35 * <p>save</p>
36 *
37 * @param entity a {@link java.lang.Object} object.
38 * @return a boolean.
39 */
40 boolean save(T entity);
41
42 /**
43 * <p>merge</p>
44 *
45 * @param entity a {@link java.lang.Object} object.
46 * @param mergeTarget a {@link java.lang.Object} object.
47 * @return a boolean.
48 */
49 boolean merge(T entity, T mergeTarget);
50
51 /**
52 * <p>delete</p>
53 *
54 * @param entity a {@link java.lang.Object} object.
55 * @return a boolean.
56 */
57 boolean delete(T entity);
58 }