Hibernate ORM Disjunction - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Hibernate ORM Disjunction class.

This code example shows how to use the following methods:add
    public Collection findAll_order(boolean isRoot, String col, boolean asc, Collection excludes) {
        Criteria criteria = createCriteria();
 
        if (isRoot) {
            Disjunction disjunctions = Restrictions.disjunction();
            disjunctions.add(Restrictions.eq("system", Boolean.FALSE));
            disjunctions.add(Restrictions.eq("id", AuthzConstants.rootSubjectId));
            criteria.add(disjunctions);
        } else { 
            criteria.add(Restrictions.eq("system", Boolean.FALSE));
        } 
 
        criteria.addOrder(asc ? Order.asc(col) : Order.desc(col));
 
        if (excludes != null && excludes.size() > 0) {
            criteria.add(Restrictions.not(Restrictions.in("id", excludes)));
        } 
 
        return criteria.list();
 

4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
            throws QueryException {
 
        validateFilter(filter);
 
        Disjunction disjunction = Restrictions.disjunction();
        updateJunction(filter.getConditions(), disjunction);
 
        return disjunction;
    } 
 
    @Override 
    public OrRestriction cloneInstance() { 
        return new OrRestriction(); 
    } 
} 

4
CodeRank
Experience pair programming with AI  Get Codota for Java
See Code Examples for Hibernate ORM Disjunction Methods: