Project

General

Profile

Download (1.54 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2007 EDIT
3
* European Distributed Institute of Taxonomy
4
* http://www.e-taxonomy.eu
5
*
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.
8
*/
9

    
10
package eu.etaxonomy.taxeditor.annotatedlineeditor;
11

    
12
import eu.etaxonomy.cdm.api.service.config.DeleteConfiguratorBase;
13
import eu.etaxonomy.cdm.api.service.exception.ReferencedObjectUndeletableException;
14

    
15

    
16
/**
17
 * Performs the retrieving and saving of a list of entities edited by a <code>ListEditor</code>,
18
 * interacting with the persistence layer.
19
 * <p>
20
 * The methods' element input parameter is typically the <code>ListEditor</code>'s <code>IEditorInput</code>.
21
 *
22
 * @author p.ciardelli
23
 * @created 07.07.2009
24
 * @version 1.0
25
 */
26
public interface IEntityPersistenceService<T> {
27

    
28
	/**
29
	 * <p>create</p>
30
	 *
31
	 * @param entity a {@link java.lang.Object} object.
32
	 * @return a boolean.
33
	 */
34
	T create(T entity);
35

    
36
	/**
37
	 * <p>save</p>
38
	 *
39
	 * @param entity a {@link java.lang.Object} object.
40
	 * @return a boolean.
41
	 */
42
	T save(T entity);
43

    
44
	/**
45
	 * <p>merge</p>
46
	 *
47
	 * @param entity a {@link java.lang.Object} object.
48
	 * @param mergeTarget a {@link java.lang.Object} object.
49
	 * @return a boolean.
50
	 */
51
	boolean merge(T entity, T mergeTarget);
52

    
53
	/**
54
	 * <p>delete</p>
55
	 *
56
	 * @param entity a {@link java.lang.Object} object.
57
	 * @return a boolean.
58
	 * @throws ReferencedObjectUndeletableException
59
	 */
60
	boolean delete(T entity, DeleteConfiguratorBase config) throws ReferencedObjectUndeletableException;
61
}
(9-9/16)