Restriction (element)

From JRapid

Jump to: navigation, search

The "restriction" element can be used to set a restriction made entirely with HQL.

Usage

<restriction
            expr = EXPR
            usedistinct = "usedistinct" 
            (param*)
/>
  • ?: a param for the expression.
  • usedistinct: it indicates that the HQL queries shouldn‘t bring duplicate rows.

Example

<filter display="primary" label="Contact" name="contactFilter">
     <restriction expr="me.company in (select company from Company as company where ? in
                 (select contact.surname from Contact as contact where
                 contact.company=me.company))">
                 <param value="contactFilter"/>
     </restriction>
</filter>

See also

Personal tools