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
|
import java.util.List;
|
14
|
|
15
|
/**
|
16
|
* Performs the retrieving and saving of a list of entities edited by a <code>ListEditor<code>,
|
17
|
* interacting with the persistence layer.
|
18
|
* <p>
|
19
|
* The methods' element input parameter is typically the <code>ListEditor<code>'s <code>IEditorInput<code>.
|
20
|
*
|
21
|
* @author p.ciardelli
|
22
|
* @created 07.07.2009
|
23
|
* @version 1.0
|
24
|
*/
|
25
|
public interface IEntityPersistenceService {
|
26
|
|
27
|
/**
|
28
|
* <p>listEntities</p>
|
29
|
*
|
30
|
* @return a {@link java.util.List} object.
|
31
|
*/
|
32
|
List<?> listEntities();
|
33
|
|
34
|
/**
|
35
|
* <p>create</p>
|
36
|
*
|
37
|
* @param entity a {@link java.lang.Object} object.
|
38
|
* @return a boolean.
|
39
|
*/
|
40
|
boolean create(Object entity);
|
41
|
|
42
|
/**
|
43
|
* <p>save</p>
|
44
|
*
|
45
|
* @param entity a {@link java.lang.Object} object.
|
46
|
* @return a boolean.
|
47
|
*/
|
48
|
boolean save(Object entity);
|
49
|
|
50
|
/**
|
51
|
* <p>merge</p>
|
52
|
*
|
53
|
* @param entity a {@link java.lang.Object} object.
|
54
|
* @param mergeTarget a {@link java.lang.Object} object.
|
55
|
* @return a boolean.
|
56
|
*/
|
57
|
boolean merge(Object entity, Object mergeTarget);
|
58
|
|
59
|
/**
|
60
|
* <p>delete</p>
|
61
|
*
|
62
|
* @param entity a {@link java.lang.Object} object.
|
63
|
* @return a boolean.
|
64
|
*/
|
65
|
boolean delete(Object entity);
|
66
|
}
|