protected void addIdInCollectionCondition(final Expression<?> property, final Collection<?> values) {
        if (values == null || values.isEmpty()) {
            fieldConditions.add(getCriteriaBuilder().equal(property, -1));
        } else {
            fieldConditions.add(property.in(values));
        }
    }
protected void addIdInCollectionCondition ( final Expression < ? > property , final Collection < ? > values ) { if ( values == null || values . isEmpty ( ) ) { fieldConditions . add ( getCriteriaBuilder ( ) . equal ( property , - 1 ) ) ; } else { fieldConditions . add ( property . in ( values ) ) ; } }
Add a Field Search Condition that will check if the id field exists in an array of values. eg. {@code field IN (values)}

@param property The field id as defined in the Entity mapping class.
@param values   The List of Ids to be compared to.