@ SuppressWarnings ( { "rawtypes" , "unchecked" } ) protected Object calculatePropertyValue ( Object propertyValue ) { if ( propertyValue instanceof CharSequence ) { return propertyValue . toString ( ) ; } if ( propertyValue instanceof QueryableCriteria ) { propertyValue = convertToHibernateCriteria ( ( QueryableCriteria < ? > ) propertyValue ) ; } else if ( propertyValue instanceof Closure ) { propertyValue = convertToHibernateCriteria ( new grails . gorm . DetachedCriteria ( targetClass ) . build ( ( Closure < ? > ) propertyValue ) ) ; } return propertyValue ; }
Calculates the property value converting GStrings if necessary