Search in sources :

Example 1 with LeaseTypeForItalyRefData

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());
}
Also used : LeaseTypeForItalyRefData(org.estatio.module.lease.fixtures.LeaseTypeForItalyRefData) LeaseType(org.estatio.module.lease.dom.LeaseType) ApplicationTenancy(org.isisaddons.module.security.dom.tenancy.ApplicationTenancy)

Aggregations

LeaseType (org.estatio.module.lease.dom.LeaseType)1 LeaseTypeForItalyRefData (org.estatio.module.lease.fixtures.LeaseTypeForItalyRefData)1 ApplicationTenancy (org.isisaddons.module.security.dom.tenancy.ApplicationTenancy)1