]> SALOME platform Git repositories - tools/siman.git/blobdiff - Workspace/Siman-Common/src/org/splat/dal/dao/kernel/GenericDAO.java
Salome HOME
More business logic has been moved from BO to services. ServiceLocator is created...
[tools/siman.git] / Workspace / Siman-Common / src / org / splat / dal / dao / kernel / GenericDAO.java
index 9ae2887d9287711adfbb627eff7926d7adcbaa72..68f67d29912040d0f2b1fc039113a2d859dc5793 100644 (file)
@@ -1,5 +1,5 @@
 /*****************************************************************************
- * Company         EURIWARE
+ * Company         OPEN CASCADE
  * Application     SIMAN
  * File            $Id$ 
  * Creation date   08.10.2012
@@ -70,6 +70,24 @@ public interface GenericDAO<T, PK extends Serializable> {
         */
        public T findByCriteria(Criterion aCondition);
 
+       /**
+        * Retrieve a list of all objects of the considered type T which were previously persisted to the database.
+        * 
+        * @return a list of all objects of the considered type T
+        */
+       @SuppressWarnings("unchecked")
+       public List<T> getAll();
+
+       /**
+        * Retrieve an ordered list of all objects of the considered type T which were previously persisted to the database.
+        * 
+        * @param anOrder
+        *            a result list order. Null is ignored and in such case the result list is unordered.
+        * @return an ordered list of all objects of the considered type T
+        */
+       @SuppressWarnings("unchecked")
+       public List<T> getAll(Order anOrder);
+       
        /**
         * Retrieve a list of objects which were previously persisted to the database using the given criteria.
         * 
@@ -89,4 +107,20 @@ public interface GenericDAO<T, PK extends Serializable> {
         */
        @SuppressWarnings("unchecked")
        public List<T> getFilteredList(Criterion aCondition, Order anOrder);
+
+       /**
+        * Makes detached object persistent.
+        * @param transientObject
+        *            transient instance of the object to be made persistent
+        */
+       public void persist(T transientObject);
+
+       /**
+        * Merge detached object with persistent data.
+        * 
+        * @param transientObject
+        *            transient instance of the object to be merged with persistent data
+        * @return merged persistent object
+        */
+       public T merge(T transientObject);
 }