deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject [1/2] git commit: DELTASPIKE-627 API clarifications.
Date Thu, 12 Jun 2014 18:26:50 GMT
Repository: deltaspike
Updated Branches:
  refs/heads/master 2af2ccf25 -> 8fc6b38bb


DELTASPIKE-627 API clarifications.


Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/8fc6b38b
Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/8fc6b38b
Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/8fc6b38b

Branch: refs/heads/master
Commit: 8fc6b38bbcca6314e71337c499b035a11be0b4a6
Parents: 11af2fa
Author: Thomas Hug <Thomas.Hug@ctp.com>
Authored: Thu Jun 12 11:23:26 2014 -0700
Committer: Thomas Hug <Thomas.Hug@ctp.com>
Committed: Thu Jun 12 11:23:42 2014 -0700

----------------------------------------------------------------------
 .../org/apache/deltaspike/data/api/EntityRepository.java     | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltaspike/blob/8fc6b38b/deltaspike/modules/data/api/src/main/java/org/apache/deltaspike/data/api/EntityRepository.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/data/api/src/main/java/org/apache/deltaspike/data/api/EntityRepository.java
b/deltaspike/modules/data/api/src/main/java/org/apache/deltaspike/data/api/EntityRepository.java
index cef4e01..b31b96e 100755
--- a/deltaspike/modules/data/api/src/main/java/org/apache/deltaspike/data/api/EntityRepository.java
+++ b/deltaspike/modules/data/api/src/main/java/org/apache/deltaspike/data/api/EntityRepository.java
@@ -24,7 +24,7 @@ import java.util.List;
 import javax.persistence.metamodel.SingularAttribute;
 
 /**
- * Base Repository interface. All methods are implemented by the query extension.
+ * Base Repository interface. All methods are implemented by the CDI extension.
  *
  * @param <E>   Entity type.
  * @param <PK>  Primary key type.
@@ -33,7 +33,11 @@ public interface EntityRepository<E, PK extends Serializable>
 {
 
     /**
-     * Persist (new entity) or merge the given entity.
+     * Persist (new entity) or merge the given entity. The distinction on calling either
+     * method is done based on the primary key field being null or not.
+     * If this results in wrong behavior for a specific case, consider using the
+     * {@link org.apache.deltaspike.data.api.EntityManagerDelegate} which offers both
+     * {@code persist} and {@code merge}.
      * @param entity            Entity to save.
      * @return                  Returns the modified entity.
      */


Mime
View raw message