public org . grails . datastore . mapping . query . api . Criteria sizeEq ( String propertyName , int size ) { if ( ! validateSimpleExpression ( ) ) { throwRuntimeException ( new IllegalArgumentException ( "Call to [sizeEq] with propertyName [" + propertyName + "] and size [" + size + "] not allowed here." ) ) ; } propertyName = calculatePropertyName ( propertyName ) ; addToCriteria ( Restrictions . sizeEq ( propertyName , size ) ) ; return this ; }
Creates a Criterion that contrains a collection property by size