code: @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;
      }
docs: Calculates the property value, converting GStrings if necessary
  
  @param propertyValue The property value
  @return The calculated property value