All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ro.fortsoft.genericdata.utils.hibernate.CriteriaUtil Maven / Gradle / Ivy

package ro.fortsoft.genericdata.utils.hibernate;

import org.hibernate.criterion.Criterion;
import org.hibernate.criterion.Restrictions;

public final class CriteriaUtil {

	private CriteriaUtil() {
	}

	public static Criterion buildPersistentRestriction() {
		final Criterion deleted = Restrictions.or(Restrictions.isNull("deleted"),
				Restrictions.eq("deleted", Boolean.FALSE));
		return deleted;
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy