use of org.apache.isis.applib.ApplicationException in project estatio by estatio.
the class LeaseTermImportAbstract method fetchLease.
private Lease fetchLease(final String leaseReference) {
final Lease lease;
lease = leaseRepository.findLeaseByReference(leaseReference.trim().replaceAll("~", "+"));
if (lease == null) {
throw new ApplicationException(String.format("Lease with reference %s not found.", leaseReference));
}
return lease;
}
use of org.apache.isis.applib.ApplicationException in project estatio by estatio.
the class CommunicationChannelImport method fetchLease.
private Lease fetchLease(final String leaseReference) {
final Lease lease;
lease = leaseRepository.findLeaseByReference(leaseReference.trim().replaceAll("~", "+"));
if (lease == null) {
throw new ApplicationException(String.format("Lease with reference %s not found.", leaseReference));
}
return lease;
}
use of org.apache.isis.applib.ApplicationException in project estatio by estatio.
the class BankMandateImport method fetchLease.
private Lease fetchLease(final String leaseReference) {
final Lease lease;
lease = leaseRepository.findLeaseByReference(leaseReference.trim().replaceAll("~", "+"));
if (lease == null) {
throw new ApplicationException(String.format("Lease with reference %s not found.", leaseReference));
}
return lease;
}
use of org.apache.isis.applib.ApplicationException in project estatio by estatio.
the class BreakOptionImport method fetchLease.
private Lease fetchLease(final String leaseReference) {
final Lease lease;
lease = leaseRepository.findLeaseByReference(leaseReference.trim().replaceAll("~", "+"));
if (lease == null) {
throw new ApplicationException(String.format("Lease with reference %s not found.", leaseReference));
}
return lease;
}
use of org.apache.isis.applib.ApplicationException in project estatio by estatio.
the class BudgetImportExport method findOrCreateBudgetAndBudgetItem.
private BudgetItem findOrCreateBudgetAndBudgetItem(final Charge incomingCharge) {
Property property = propertyRepository.findPropertyByReference(getPropertyReference());
if (property == null)
throw new ApplicationException(String.format("Property with reference [%s] not found.", getPropertyReference()));
Budget budget = budgetRepository.findOrCreateBudget(property, getBudgetStartDate(), getBudgetEndDate());
BudgetItem budgetItem = budget.findOrCreateBudgetItem(incomingCharge).updateOrCreateBudgetItemValue(getBudgetedValue(), getBudgetStartDate(), BudgetCalculationType.BUDGETED).updateOrCreateBudgetItemValue(getAuditedValue(), getBudgetEndDate(), BudgetCalculationType.ACTUAL);
return budgetItem;
}
Aggregations