class PrimitiveLongToIntegerMapper implements TypeMapper<Long, Integer> {

    @Override
    public String getLabel() {
        return "Long to int (primitive)";
    }

    @Override
    public Type getJavaType(Column column) {
        return int.class;
    }

    @Override
    public Integer toJavaType(Column column, Class<?> entityType, Long value) {<FILL_FUNCTION_BODY>}

    @Override
    public Long toDatabaseType(Integer value) {
        return value == null ? null : ((long) (int) value);
    }
    
    @Override
    public Ordering getOrdering() {
        return Ordering.RETAIN;
    }

}

        return value == null ? null : ((int) (long) value);
    
<no_super_class>