ibatis dynamic sql using two conditions
===

I would like to use a dynamic sql statement that executes when the variable is not null AND greater than zero.  Like this:

    <isNotNull prepend="AND" property="ProprietaryId">
        <isGreaterThan prepend="AND" property="ProprietaryId">
            G.PROPRIETARY_ID = #ProprietaryId#
        </isGreaterThan>
    </isNotNull>

but without prepending two and statements.