class DateIntToPrimitiveShortMapper implements TypeMapper<Integer, Short> {

    @Override
    public String getLabel() {
        return "Date Integer to short (primitive)";
    }

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

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

    @Override
    public Integer toDatabaseType(Short value) {
        if (value == null) return null;

        final LocalDate date = LocalDate.ofEpochDay(value);
        return date.getYear() * 10_000 + date.getMonthValue() * 100 + date.getDayOfMonth();
    }
}

        if (date == null) return null;
        final int day = date % 100;
        final int month = (date % 10_000 - day) / 100;
        final int year = date / 10_000;

        final  LocalDate localDate = LocalDate.of(year, month, day);
        return  (short) ChronoUnit.DAYS.between(localDate, LocalDate.of(1970, 1,1));
    
<no_super_class>