code: public Comparable convertForSorting(S source) throws FrameworkException {
  
  		if(source != null) {
  
  			if (source instanceof Comparable) {
  
  				return (Comparable)source;
  			}
  
  			// fallback
  			return source.toString();
  		}
  
  		return null;
  	}
docs: Convert from source type to Comparable to allow a more
  fine-grained control over the sorted results. Override
  this method to modify sorting behaviour of entities.
  
  @param source
  @return converted source
  @throws org.structr.common.error.FrameworkException