List of usage examples for org.hibernate.criterion Property isNull
public Criterion isNull()
From source file:io.github.jonestimd.finance.dao.hibernate.AccountDaoImpl.java
License:Open Source License
public Account getAccount(Company company, String name) { Property companyProperty = getProperty(Account.COMPANY); Criterion companyCriterion = company == null ? companyProperty.isNull() : companyProperty.eq(company); return findUnique(companyCriterion, Restrictions.eq(Account.NAME, name)); }