import java.util.Date;
import javax.persistence.AttributeConverter;
import javax.persistence.Converter;
import org.joda.time.LocalDate;
@Converter(autoApply = true)
public class JodaLocalDateConverter implements AttributeConverter<LocalDate, Date> {
public Date convertToDatabaseColumn(LocalDate localDate) {
return localDate.toDate();
}
public LocalDate convertToEntityAttribute(Date date) {
return LocalDate.fromDateFields(date);
}
}