use of org.estatio.module.charge.fixtures.chargegroups.enums.ChargeGroup_enum in project estatio by estatio.
the class LeaseItemForEntryFeeBuilder method execute.
@Override
protected void execute(final ExecutionContext ec) {
defaultParam("charge", ec, Charge_enum.ItEntryFee.findUsing(serviceRegistry));
final ChargeGroup group = getCharge().getGroup();
final ChargeGroup_enum expectedGroup = ChargeGroup_enum.EntryFee;
if (group != expectedGroup.findUsing(serviceRegistry)) {
throw new IllegalArgumentException("Charge's group must be " + expectedGroup.getRef());
}
LeaseItem leaseItem = new LeaseItemBuilder().setLease(lease).setCharge(charge).setLeaseItemType(LEASE_ITEM_TYPE).setInvoicingFrequency(INVOICING_FREQUENCY).setInvoicedBy(invoicedBy).setPaymentMethod(paymentMethod).setStatus(status).setSequence(sequence).build(this, ec).getObject();
for (final LeaseTermForFixedBuilder.TermSpec termSpec : termSpecs) {
final LeaseTermForFixed term = new LeaseTermForFixedBuilder().setLeaseItem(leaseItem).setStartDate(termSpec.startDate).setEndDate(termSpec.endDate).setLeaseTermFrequency(termSpec.leaseTermFrequency).setValue(termSpec.value).build(this, ec).getObject();
terms.add(term);
}
object = leaseItem;
}
use of org.estatio.module.charge.fixtures.chargegroups.enums.ChargeGroup_enum in project estatio by estatio.
the class LeaseItemForIndexableBuilder method execute.
@Override
protected void execute(final ExecutionContext ec) {
defaultParam("charge", ec, Charge_enum.ItServiceChargeIndexable.findUsing(serviceRegistry));
final ChargeGroup group = getCharge().getGroup();
final ChargeGroup_enum expectedGroup = ChargeGroup_enum.ServiceChargeIndexable;
if (group != expectedGroup.findUsing(serviceRegistry)) {
throw new IllegalArgumentException("Charge's group must be " + expectedGroup.getRef());
}
LeaseItem leaseItem = new LeaseItemBuilder().setLease(lease).setCharge(charge).setLeaseItemType(LEASE_ITEM_TYPE).setInvoicingFrequency(INVOICING_FREQUENCY).setInvoicedBy(invoicedBy).setPaymentMethod(paymentMethod).setStatus(status).setSequence(sequence).build(this, ec).getObject();
for (final LeaseTermForIndexableBuilder.TermSpec termSpec : termSpecs) {
final LeaseTermForIndexable term = new LeaseTermForIndexableBuilder().setLeaseItem(leaseItem).setStartDate(termSpec.startDate).setEndDate(termSpec.endDate).setLeaseTermFrequency(termSpec.leaseTermFrequency).setBaseValue(termSpec.baseValue).setBaseIndexStartDate(termSpec.baseIndexStartDate).setNextIndexStartDate(termSpec.nextIndexStartDate).setEffectiveDate(termSpec.effectiveDate).setIndex(termSpec.index).build(this, ec).getObject();
terms.add(term);
}
object = leaseItem;
}
use of org.estatio.module.charge.fixtures.chargegroups.enums.ChargeGroup_enum in project estatio by estatio.
the class LeaseItemForRentBuilder method execute.
@Override
protected void execute(final ExecutionContext ec) {
defaultParam("charge", ec, Charge_enum.ItRent.findUsing(serviceRegistry));
final ChargeGroup group = getCharge().getGroup();
final ChargeGroup_enum expectedGroup = ChargeGroup_enum.Rent;
if (group != expectedGroup.findUsing(serviceRegistry)) {
throw new IllegalArgumentException("Charge's group must be " + expectedGroup.getRef());
}
LeaseItem leaseItem = new LeaseItemBuilder().setLease(lease).setCharge(charge).setLeaseItemType(LEASE_ITEM_TYPE).setInvoicingFrequency(INVOICING_FREQUENCY).setInvoicedBy(invoicedBy).setPaymentMethod(paymentMethod).setStatus(status).setSequence(sequence).build(this, ec).getObject();
for (LeaseTermForIndexableBuilder.TermSpec termSpec : termSpecs) {
final LeaseTermForIndexable term = new LeaseTermForIndexableBuilder().setLeaseItem(leaseItem).setStartDate(termSpec.startDate).setEffectiveDate(termSpec.endDate).setBaseValue(termSpec.baseValue).setBaseIndexStartDate(termSpec.baseIndexStartDate).setNextIndexStartDate(termSpec.nextIndexStartDate).setEffectiveDate(termSpec.effectiveDate).setIndex(termSpec.index).build(this, ec).getObject();
terms.add(term);
}
object = leaseItem;
}
use of org.estatio.module.charge.fixtures.chargegroups.enums.ChargeGroup_enum in project estatio by estatio.
the class LeaseItemForServiceChargeBudgetedBuilder method execute.
@Override
protected void execute(final ExecutionContext ec) {
defaultParam("charge", ec, Charge_enum.GbServiceCharge.findUsing(serviceRegistry));
final ChargeGroup group = getCharge().getGroup();
final ChargeGroup_enum expectedGroup = ChargeGroup_enum.ServiceCharge;
if (group != expectedGroup.findUsing(serviceRegistry)) {
throw new IllegalArgumentException("Charge's group must be " + expectedGroup.getRef());
}
final LeaseItem leaseItem = new LeaseItemBuilder().setLease(lease).setCharge(charge).setLeaseItemType(LEASE_ITEM_TYPE).setInvoicingFrequency(INVOICING_FREQUENCY).setInvoicedBy(invoicedBy).setPaymentMethod(paymentMethod).setStatus(status).setSequence(sequence).build(this, ec).getObject();
object = leaseItem;
}
use of org.estatio.module.charge.fixtures.chargegroups.enums.ChargeGroup_enum in project estatio by estatio.
the class LeaseItemForServiceChargeBuilder method execute.
@Override
protected void execute(final ExecutionContext ec) {
defaultParam("charge", ec, Charge_enum.GbServiceCharge.findUsing(serviceRegistry));
final ChargeGroup group = getCharge().getGroup();
final ChargeGroup_enum expectedGroup = ChargeGroup_enum.ServiceCharge;
if (group != expectedGroup.findUsing(serviceRegistry)) {
throw new IllegalArgumentException("Charge's group must be " + expectedGroup.getRef());
}
LeaseItem leaseItem = new LeaseItemBuilder().setLease(lease).setCharge(charge).setLeaseItemType(LEASE_ITEM_TYPE).setInvoicingFrequency(INVOICING_FREQUENCY).setInvoicedBy(invoicedBy).setPaymentMethod(paymentMethod).setStatus(status).setSequence(sequence).build(this, ec).getObject();
for (LeaseTermForServiceChargeBuilder.TermSpec termSpec : termSpecs) {
final LeaseTermForServiceCharge term = new LeaseTermForServiceChargeBuilder().setLeaseItem(leaseItem).setStartDate(termSpec.startDate).setEndDate(termSpec.endDate).setLeaseTermFrequency(termSpec.leaseTermFrequency).setBudgetedValue(termSpec.budgetedValue).build(this, ec).getObject();
terms.add(term);
}
object = leaseItem;
}
Aggregations