had to rename the packages to make them compliant with buckminster
[taxeditor.git] / eu.etaxonomy.taxeditor.bulkeditor / src / main / java / eu / etaxonomy / taxeditor / annotatedlineeditor / IEntityPersistenceService.java
diff --git a/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/annotatedlineeditor/IEntityPersistenceService.java b/eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/annotatedlineeditor/IEntityPersistenceService.java
new file mode 100644 (file)
index 0000000..7c292c5
--- /dev/null
@@ -0,0 +1,58 @@
+// $Id$
+/**
+* Copyright (C) 2007 EDIT
+* European Distributed Institute of Taxonomy 
+* http://www.e-taxonomy.eu
+* 
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+
+package eu.etaxonomy.taxeditor.annotatedlineeditor;
+
+
+/**
+ * Performs the retrieving and saving of a list of entities edited by a <code>ListEditor</code>,
+ * interacting with the persistence layer.
+ * <p>
+ * The methods' element input parameter is typically the <code>ListEditor</code>'s <code>IEditorInput</code>.
+ *
+ * @author p.ciardelli
+ * @created 07.07.2009
+ * @version 1.0
+ */
+public interface IEntityPersistenceService<T> {
+       
+       /**
+        * <p>create</p>
+        *
+        * @param entity a {@link java.lang.Object} object.
+        * @return a boolean.
+        */
+       boolean create(T entity);
+       
+       /**
+        * <p>save</p>
+        *
+        * @param entity a {@link java.lang.Object} object.
+        * @return a boolean.
+        */
+       boolean save(T entity);
+       
+       /**
+        * <p>merge</p>
+        *
+        * @param entity a {@link java.lang.Object} object.
+        * @param mergeTarget a {@link java.lang.Object} object.
+        * @return a boolean.
+        */
+       boolean merge(T entity, T mergeTarget);
+       
+       /**
+        * <p>delete</p>
+        *
+        * @param entity a {@link java.lang.Object} object.
+        * @return a boolean.
+        */
+       boolean delete(T entity);
+}