private int forNull(Parameter parameter) {
        final int firstOutcome = (Parameter.FIRST == parameter) ? -1 : 1;
        final int lastOutcome  = -firstOutcome;
        
        switch (nullOrder) {
            case FIRST : return applyReversed(firstOutcome);
            case LAST  : return applyReversed(lastOutcome);
            case NONE  : throw new NullPointerException(
                "A field was null and null fields not allowed"
            );
            default : throw new IllegalStateException("Illegal NullOrder");
        }
    }
The default implementation of the {@link ReferenceFieldComparator} interface.

@param <ENTITY>  the entity type
@param <D>       the database type
@param <V>       the value type

@author  Per Minborg
@author  Emil Forslund
@since   2.2.0
runtime-parent/runtime-field/src/main/java/com/speedment/runtime/field/internal/comparator/ReferenceFieldComparatorImpl.java