Hi,
it would be nice if the spec would mandate that implementations of
javax.jdo.Query do correctly implement hashCode() and equals().
Alternatively, Query.toString() could be required to return the
single-string representation of the query, or some dedicated method was
added to provide it.
This
Hi Jörg,
On Oct 16, 2009, at 9:50 AM, Joerg von Frantzius wrote:
Hi,
it would be nice if the spec would mandate that implementations of
javax.jdo.Query do correctly implement hashCode() and equals().
As users execute mutator methods on queries, the string representation
would change. And f
Hi Craig,
you are absolutely right about the Query object being mutable, and this
conflicting with its use as a key in a HashMap. But telling from the
general contracts of Map, equals() and hashCode(), I don't think that
there exists a requirement for Map keys to be immutable. There may also
be ot
Hi Jörg,
On Nov 16, 2009, at 8:32 AM, Joerg von Frantzius wrote:
Hi Craig,
you are absolutely right about the Query object being mutable, and
this
conflicting with its use as a key in a HashMap. But telling from the
general contracts of Map, equals() and hashCode(), I don't think that
there
Hi Craig,
please see below...
On 11/17/2009 12:52 AM, Craig L Russell wrote:
[..]
> Right. What I said is that for use as an element in a Set or as a key
> in a Map, the instance should return the identical hashCode and behave
> identically with respect to equals. So while the instance itself do
(sub)set of the immutable fields.
Cheers,
Christian
From:
Joerg von Frantzius
To:
Craig L Russell
Cc:
jdo-dev@db.apache.org, JDO Expert Group
Date:
17.11.2009 12:55
Subject:
Re: Query objects and hashCode() + equals()
Hi Craig,
please see below...
On 11/17/2009 12:52 AM, Craig L
> Our application framework caches the results of certain queries. It does
> not hand out the respective Query objects to application code, and it
> does not itself invoke any mutators on these Query objects.
DataNucleus v2.x also allows caching of query results (for non-legacy JDOQL
implementati
Hi Andy,
all I could find in the docs was
http://www.datanucleus.org/extensions/query_cache.html which is about
caching of "query compilations". Or do you mean that it could be used to
store query results along with a cached QueryCompilation object?
On 11/17/2009 06:19 PM, Andy Jefferson wrote:
>
> all I could find in the docs was
> http://www.datanucleus.org/extensions/query_cache.html which is about
> caching of "query compilations". Or do you mean that it could be used to
> store query results along with a cached QueryCompilation object?
PMF prop(s)
http://www.datanucleus.org/products/a