You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by do...@apache.org on 2012/05/12 23:22:27 UTC
svn commit: r1337688 - in
/ofbiz/trunk/framework/entity/src/org/ofbiz/entity: Delegator.java
GenericDelegator.java
Author: doogie
Date: Sat May 12 21:22:26 2012
New Revision: 1337688
URL: http://svn.apache.org/viewvc?rev=1337688&view=rev
Log:
Deprecate Delegator.findByPrimaryKey and Delegator.findByPrimaryKeyCache.
Ofbiz is moving towards simpler delegator apis; this means all
'fooCache' variants are removed(and their matching 'foo' method), and a
new version of 'foo' added that takes a boolean cache parameter.
Delegator.findByPrimaryKey(String, Map) is replaced with
findOne(String, Map, false).
Delegator.findByPrimaryKeyCache(String, Map) is replaced with
findOne(String, Map, true).
Delegator.findByPrimaryKey(String, Object...) is replaced with
findOne(String, false, Object...).
Modified:
ofbiz/trunk/framework/entity/src/org/ofbiz/entity/Delegator.java
ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java
Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/Delegator.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/Delegator.java?rev=1337688&r1=1337687&r2=1337688&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/Delegator.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/Delegator.java Sat May 12 21:22:26 2012
@@ -373,7 +373,9 @@ public interface Delegator {
* The fields of the named entity to query by with their
* corresponding values
* @return The GenericValue corresponding to the primaryKey
+ * @deprecated use {@link #findOne(String, Map, boolean)}
*/
+ @Deprecated
public GenericValue findByPrimaryKey(String entityName, Map<String, ? extends Object> fields) throws GenericEntityException;
/**
@@ -386,7 +388,9 @@ public interface Delegator {
* The fields of the named entity to query by with their
* corresponding values
* @return The GenericValue corresponding to the primaryKey
+ * @deprecated use {@link #findOne(String, Map, boolean)}
*/
+ @Deprecated
public GenericValue findByPrimaryKeyCache(String entityName, Map<String, ? extends Object> fields) throws GenericEntityException;
/**
@@ -399,7 +403,9 @@ public interface Delegator {
* The fields of the named entity to query by with their
* corresponding values
* @return The GenericValue corresponding to the primaryKey
+ * @deprecated use {@link #findOne(String, boolean, Object...)}
*/
+ @Deprecated
public GenericValue findByPrimaryKeyCache(String entityName, Object... fields) throws GenericEntityException;
/**
Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java?rev=1337688&r1=1337687&r2=1337688&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java Sat May 12 21:22:26 2012
@@ -1612,21 +1612,27 @@ public class GenericDelegator implements
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#findByPrimaryKey(java.lang.String, java.util.Map)
+ * @deprecated use {@link #findOne(String, Map, boolean)}
*/
+ @Deprecated
public GenericValue findByPrimaryKey(String entityName, Map<String, ? extends Object> fields) throws GenericEntityException {
return findOne(entityName, fields, false);
}
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#findByPrimaryKeyCache(java.lang.String, java.lang.Object)
+ * @deprecated use {@link #findOne(String, boolean, Object...)}
*/
+ @Deprecated
public GenericValue findByPrimaryKeyCache(String entityName, Object... fields) throws GenericEntityException {
return findByPrimaryKeyCache(entityName, UtilMisc.<String, Object>toMap(fields));
}
/* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#findByPrimaryKeyCache(java.lang.String, java.util.Map)
+ * @deprecated use {@link #findOne(String, Map, boolean)}
*/
+ @Deprecated
public GenericValue findByPrimaryKeyCache(String entityName, Map<String, ? extends Object> fields) throws GenericEntityException {
return findOne(entityName, fields, true);
}