Skip to content

Commit

Permalink
Improvement - Added a new method: getRelatedByAndCache because there …
Browse files Browse the repository at this point in the history
…is only a methode getRelatedByAnd which uses no cache.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1079456 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
Sascha Rodekamp committed Mar 8, 2011
1 parent 7e887a8 commit de3b8e3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions framework/entity/src/org/ofbiz/entity/util/EntityUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,16 @@ public static List<GenericValue> getRelatedByAnd(String relationName, Map<String
return result;
}

public static List<GenericValue> getRelatedByAndCache(String relationName, Map<String, ? extends Object> fields, List<GenericValue> values) throws GenericEntityException {
if (values == null) return null;

List<GenericValue> result = FastList.newInstance();
for (GenericValue value: values) {
result.addAll(value.getRelatedByAndCache(relationName, fields));
}
return result;
}

public static <T extends GenericEntity> List<T> filterByCondition(List<T> values, EntityCondition condition) {
if (values == null) return null;

Expand Down

0 comments on commit de3b8e3

Please sign in to comment.