private static int getField(Date date, int field) {
        Calendar cal = Calendar.getInstance();
        cal.setTime(date);
        return cal.get(field);
    }
{@code CollQueryFunctions} defines function implementation for use in ColQueryTemplates

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