use of org.estatio.module.lease.dom.breaks.BreakExerciseType in project estatio by estatio.
the class BreakOptionImport method importData.
@Programmatic
@Override
public List<Object> importData(final Object previousRow) {
final Lease lease = fetchLease(leaseReference);
final BreakType breakTypeValue = BreakType.valueOf(breakType);
final BreakExerciseType breakExerciseTypeValue = BreakExerciseType.valueOf(breakExcerciseType);
if (notificationDate != null) {
final Period period = new Period(notificationDate, breakDate);
notificationPeriod = JodaPeriodUtils.asSimpleString(period);
}
BreakOption br = breakOptionRepository.findByLeaseAndTypeAndBreakDateAndExerciseType(lease, breakTypeValue, breakDate, breakExerciseTypeValue);
if (br == null) {
breakOptionRepository.newBreakOption(lease, breakDate, notificationPeriod, breakTypeValue, breakExerciseTypeValue, description);
}
return Lists.newArrayList();
}
Aggregations