src/main/java/edu/wisc/my/portlets/bookmarks/dao/hibernate/HibernateBookmarkStore.java
private Criterion smartEqual(String property, Object value) {
        if (value == null) {
            return Restrictions.isNull(property);
        }
        else {
            return Restrictions.eq(property, value);
        }
    }
private Criterion smartEqual(String property, Object value) {
        if (value == null) {
            return Restrictions.isNull(property);
        }
        else {
            return Restrictions.eq(property, value);
        }
    }
There are two different Criterion for if a property is null or checking equality. This is a
convience method to return the one based on if value is null or not.