From ca73e7694e4e088af1c2a976eaba0c1d852e7dc0 Mon Sep 17 00:00:00 2001 From: Jacques Le Roux Date: Sun, 15 Sep 2013 21:58:38 +0000 Subject: [PATCH] As suggested on dev ML, reintroduces findAll("EntityName") but uses the new pattern with a cache variable rather than a signature with "Cache" in method name (thanks to Adrian's comment on dev ML) git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1523507 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/org/ofbiz/entity/Delegator.java | 13 +++++++++++++ .../org/ofbiz/entity/GenericDelegator.java | 19 +++++-------------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/framework/entity/src/org/ofbiz/entity/Delegator.java b/framework/entity/src/org/ofbiz/entity/Delegator.java index 1dc61a70fb..76b5758703 100644 --- a/framework/entity/src/org/ofbiz/entity/Delegator.java +++ b/framework/entity/src/org/ofbiz/entity/Delegator.java @@ -292,6 +292,19 @@ public interface Delegator { */ public EntityListIterator find(String entityName, EntityCondition whereEntityCondition, EntityCondition havingEntityCondition, Set fieldsToSelect, List orderBy, EntityFindOptions findOptions) throws GenericEntityException; + /** + * Finds all Generic entities + * + * @param entityName + * The Name of the Entity as defined in the entity XML file + * @param useCache + * Whether to cache the results + * @return List containing all Generic entities + * @deprecated use {@link #findList(String entityName, EntityCondition entityCondition, Set fieldsToSelect, List orderBy, EntityFindOptions findOptions, boolean useCache) + */ + @Deprecated + public List findAll(String entityName, boolean useCache) throws GenericEntityException; + /** * Finds Generic Entity records by all of the specified fields (ie: combined * using AND) NOTE 20080502: 264 references diff --git a/framework/entity/src/org/ofbiz/entity/GenericDelegator.java b/framework/entity/src/org/ofbiz/entity/GenericDelegator.java index 3f6cbaf3fd..3c3810afd6 100644 --- a/framework/entity/src/org/ofbiz/entity/GenericDelegator.java +++ b/framework/entity/src/org/ofbiz/entity/GenericDelegator.java @@ -1676,23 +1676,14 @@ public class GenericDelegator implements Delegator { /** Finds all Generic entities *@param entityName The Name of the Entity as defined in the entity XML file - *@return List containing all Generic entities - *@deprecated Use findList() instead + * @see org.ofbiz.entity.Delegator#findAll(java.lang.String, boolean) + * @deprecated use {@link #findList(java.lang.String, org.ofbiz.entity.condition.EntityCondition, java.util.Set, java.util.List, org.ofbiz.entity.util.EntityFindOptions, boolean)} + * */ - public List findAll(String entityName) throws GenericEntityException { - return this.findList(entityName, null, null, null, null, false); + public List findAll(String entityName, boolean useCache) throws GenericEntityException { + return this.findList(entityName, null, null, null, null, useCache); } - /** Finds all Generic entities, looking first in the cache - *@param entityName The Name of the Entity as defined in the entity XML file - *@return List containing all Generic entities - *@deprecated Use findList() instead - */ - public List findAllCache(String entityName) throws GenericEntityException { - return this.findList(entityName, null, null, null, null, true); - } - - /* (non-Javadoc) * @see org.ofbiz.entity.Delegator#findByAnd(java.lang.String, java.lang.Object) * @deprecated use {@link #findByAnd(String, Map, List, boolean)}