How to dynamically get Qualifier info from SelectQuery object

From: Pirola Davide (davide.pirol..tin.it)
Date: Thu Sep 01 2005 - 08:28:33 EDT

  • Next message: Gentry, Michael \(Contractor\): "RE: Yet another optimistic locking question"

    Hi,
    i want to extract at runtime the quelifier data from a SelectQuery object.

    I have a query defined in a datamap xml file:
    ---------------------------------------------------
    <query name="qryStat" factory="org.objectstyle.cayenne.map.SelectQueryBuilder" root="obj-entity" root-name="stat">
            <qualifier>
                    <![CDATA[(USER_ID = $userId)]]>
            </qualifier>
    </query>
    ---------------------------------------------------

    I have obtained a SelectQuery:

    ---------------------------------------------------
    SelectQuery qry = (SelectQuery) resolver.getQuery("qryStat");
    ---------------------------------------------------

    How i can retrive the field name used in "where" expression? (USER_ID)
    Is possible to get it form a property defined in SelectQuery ?

    Thank's
    Davide



    This archive was generated by hypermail 2.0.0 : Thu Sep 01 2005 - 08:27:07 EDT