class PrimitiveLongToByteMapper implements TypeMapper<Long, Byte> {

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

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

    @Override
    public Byte toJavaType(Column column, Class<?> entityType, Long value) {
        return value == null ? null : (byte) (long) value;
    }

    @Override
    public Long toDatabaseType(Byte value) {<FILL_FUNCTION_BODY>}

    @Override
    public Ordering getOrdering() {
        return Ordering.RETAIN;
    }
    
}

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