use of org.estatio.module.lease.fixtures.LeaseTypeForItalyRefData in project estatio by estatio.
the class LeaseBuilderLEGACY method execute.
@Override
protected void execute(final ExecutionContext executionContext) {
executionContext.executeChild(this, new LeaseTypeForItalyRefData());
defaultParam("reference", executionContext, fakeDataService.strings().fixed(3));
defaultParam("name", executionContext, fakeDataService.name().lastName() + " Mall");
defaultParam("leaseType", executionContext, fakeDataService.collections().anyBounded(LeaseType.class));
defaultParam("atPath", executionContext, ApplicationTenancy_enum.Gb.getPath());
defaultParam("startDate", executionContext, fakeDataService2.dates().before(fakeDataService2.periods().daysUpTo(2 * 365)));
if (getDuration() == null && getEndDate() == null) {
defaultParam("endDate", executionContext, getStartDate().plus(fakeDataService2.periods().years(10, 20)));
}
final ApplicationTenancy applicationTenancy = applicationTenancies.findTenancyByPath(getAtPath());
this.lease = leaseRepository.newLease(applicationTenancy, getReference(), getName(), getLeaseType(), getStartDate(), getDuration(), getEndDate(), getLandlord(), getTenant());
}
Aggregations