Re: subclasses of abstract Query class are not implementing all methods

2005-03-11 Thread Yonik Seeley
> Having a clean implementation of toString(), one would be able to > reparse a Query with QueryParser. This is something which was discussed > several times on the dev and user lists. I expect that it will work for > all queries supported by QueryParser. Only under certain restrictions. Remember

Re: subclasses of abstract Query class are not implementing all methods

2005-03-11 Thread Bernhard Messer
David Spencer wrote: Bernhard Messer wrote: Hi, I would like to cache query objects in a hash map. My implementation failed, because not all of the Query classes are implementing the necessary method: "public int hashCode()". The same counts for the "public boolean equals (Object o)", "public St

Re: subclasses of abstract Query class are not implementing all methods

2005-03-10 Thread David Spencer
Bernhard Messer wrote: Hi, I would like to cache query objects in a hash map. My implementation failed, because not all of the Query classes are implementing the necessary method: "public int hashCode()". The same counts for the "public boolean equals (Object o)", "public String toString(String

Re: subclasses of abstract Query class are not implementing all methods

2005-03-10 Thread Yonik Seeley
Great idea. I am also planning on doing some caching based on query objects, and I hadn't realized that these weren't implemented. In the meantime, I guess I can cache an Object that contains a Query, and traverse the query tree myself to implement missing .hashCode() or .equals() functionality.