You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by Thoralf Rickert <th...@cadooz.de> on 2005/10/21 09:39:36 UTC

View a Criteria

Hi!

In BasePeer is a method called createQueryString(Criteria) that we used
to debug our Criteria objects. Then we saw that this method changes the
Criteria object if it contains a limit and the database has native limit
support. So the createQueryString(Criteria) method isn't useful for
debugging.

Today I saw that there is another method in BasePeer called
createQueryDisplayString(Criteria). But I cannot call it from outside
the BasePeer package (org.apache.torque.util) because it's package
private and not public or protected. Is there a way to create a debug
message with a Criteria object without using the toString() method?
Would it be a problem to make the createQueryDisplayString(Criteria)
method protected, so that is accessable from outside the package?

bye
Thoralf


Re: View a Criteria

Posted by Thomas Fischer <tf...@apache.org>.
Hi,

Looking at the source code of the current dev version, the methods 
createQueryString() and createQueryDisplayString() do exactly the same 
thing. So nothing is gained from making createQueryDisplayString 
protected.

Also, the behaviour that you describe is not anymore present in the 
current dev version and in Torque 3.2-rc2. I assume that you use 
Torque 3.1.x. I'd appreciate it if you would indicate so in your next 
mail.

   Thomas.


On Fri, 21 Oct 2005, Thoralf Rickert wrote:

> Hi!
>
> In BasePeer is a method called createQueryString(Criteria) that we used
> to debug our Criteria objects. Then we saw that this method changes the
> Criteria object if it contains a limit and the database has native limit
> support. So the createQueryString(Criteria) method isn't useful for
> debugging.
>
> Today I saw that there is another method in BasePeer called
> createQueryDisplayString(Criteria). But I cannot call it from outside
> the BasePeer package (org.apache.torque.util) because it's package
> private and not public or protected. Is there a way to create a debug
> message with a Criteria object without using the toString() method?
> Would it be a problem to make the createQueryDisplayString(Criteria)
> method protected, so that is accessable from outside the package?
>
> bye
> Thoralf
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org