public static <T extends Comparable<? super T>> int compareTo(T c1, T c2) {
        if (c1 == null) {
            return c2 == null ? 0 : -1;
        } else if (c2 == null) {
            return 1;
        } else {
            return c1.compareTo(c2);
        }
    }
{@code CollQueryFunctions} defines function implementation for use in ColQueryTemplates

@author tiwe
querydsl-collections/src/main/java/com/querydsl/collections/CollQueryFunctions.java