custom datatype for date and boolean hibernate