Example usage for org.hibernate.criterion Restrictions conjunction

List of usage examples for org.hibernate.criterion Restrictions conjunction

Introduction

In this page you can find the example usage for org.hibernate.criterion Restrictions conjunction.

Prototype

public static Conjunction conjunction(Criterion... conditions) 

Source Link

Document

Group expressions together in a single conjunction (A and B and C...).

Usage

From source file:org.egov.api.controller.EmployeeController.java

License:Open Source License

private Criterion addPriorityCondition(Criterion existingCondition, String priority) {
    if (StringUtils.isNotBlank(priority)) {
        return Restrictions.conjunction(existingCondition)
                .add(Restrictions.eq("priority.id", priorityService.getPriorityByCode(priority).getId()));
    }//from  w ww.  j av a 2  s  . co m
    return existingCondition;
}