Hi Scott,

I agree it's a quite an improvement once you get used to it. Thanks for your 
idea and work on it!

Jacques

Le 28/11/2014 11:36, Scott Gray a écrit :
Hi Jacques,

Regarding question #1, pretty much every method in the API has been
added because I found a use case for it in the existing code.  In this
case, it's not at all uncommon for "useCache" parameter to be passed
into a method that performs the query.  If you look at the conversions
done so far you'll find a few such examples.  Here's an example use
case:
public static GenericValue getProduct(String productId, boolean useCache) {
   return EntityQuery.use(delegator).from("Product").where("productId",
productId).cache(useCache).queryOne();
}

For #2, I've haven't loaded tested the cost of creation of one
additional object for each query performed, it seemed inconsequential
to me compared to the value of a decent API.


Regards
Scott


On Fri, Nov 28, 2014 at 10:56 PM, Jacques Le Roux
<jacques.le.r...@les7arts.com> wrote:
Finally another question: I wanted to ask if you have made a benchmark with
load tests? I guess this new layer should have a minimal impact on
performance, but better to be safe than sorry.

Jacques

Le 28/11/2014 10:09, Jacques Le Roux a écrit :

Hi Scott,

I have just a question.

The private "useCache" is false by default. So when we don't want to use
the cache during a query we don't need to provide ".cache(false)" in the
chain, it's by default.
Then when is "cache(boolean useCache)" useful? Would not cache() be
enough?

Jacques

Le 10/11/2014 21:06, Scott Gray a écrit :
Hi Pierre,

If you review the code the implementation is actually quite
straightforward and it simply provides a more user friendly API to
functionality that already exists in the GenericDelegator and EntityUtil
classes.

I documented the API as I wrote it and that can be accessed here:
http://ci.apache.org/projects/ofbiz/site/javadocs/org/ofbiz/entity/util/EntityQuery.html

Examples are already in the code base after I spend many hours converting
hundreds of classes to use the new API.

I have no desire to write an additional document but anyone who is
willing is more than welcome to.

Regards
Scott

On 11/11/2014, at 6:49 am, Pierre Smits <pierre.sm...@gmail.com> wrote:

Scott,

I noticed you recently started to change various areas of code from
.find
(functionality) to the new entityquery implementation. As find
operations
take place on various level throughout the entire set of functionalities
in
OFBiz there is a lot to get converted. This not only applies to java
code,
but also to groovy code and even to areas in simple services and screens
and forms. All in all a enormous endeavour for this community, let alone
for just one contributor.

Could you do a page in the technical wiki explaining how it all works
and
provide some examples so that others can:

    - assist you in those areas
    - take proper notice of this new functionality when they are working
on
    new applications and/or solutions.

With such a page not only we can try to speed up the transition, but we
also help to avoid regressions.

Regards,

Pierre Smits

*ORRTIZ.COM <http://www.orrtiz.com>*
Services & Solutions for Cloud-
Based Manufacturing, Professional
Services and Retail & Trade
http://www.orrtiz.com



Reply via email to