Yes, exactly, this is why it wasn't deprecated with the big culling a while back.
-David On Dec 7, 2010, at 8:29 AM, Adam Heath wrote: > I've deprecated findByAnd locally, replacing calls with a variant that > takes a boolean, which specifies whether to use the cache. > > Initially, my replacement just added a new findByAnd. However, I'm > now starting to lean towards replacing with findList instead. > However, in my opinion, I think that will make programming ofbiz more > difficult. > > I'd like to add a findList variant, that takes a Map instead of an > EntityCondition. Without this new variant, there would be ton of > variants that would only need to import EntityCondition, just to > create a condition. > > There are also performance considerations to consider. > > EntityCondition.makeCondition(Map) directly takes the map, doing no > processing. However, EntityCondition.makeCondition(Object...) > eventually calls EntityUtil.makeFields, which does a little more than > UtilMisc. In addition to the iteration over the array, it also does a > check on the value for Comparable/Serializable. This latter check > seems a bit superfluous, as eventually the base condition classes > check the values against the model. > > So, from a purist stand point, even tho findByAnd could be replaced by > findList, I think it is too useful; it saves enough code in > application layers, imho. >