Пример #1
0
 public List<BaseEntry> getIncomeEntries() {
   if (statement.getId() == 0) {
     incomeEntries = baseEntryRepository.getBaseEntries(Type.INCOME);
   } else {
     incomeEntries = baseEntryRepository.getMissingBaseEntriesForStatement(statement, Type.INCOME);
   }
   return incomeEntries;
 }
Пример #2
0
 public List<BaseEntry> getExpenceEntries() {
   if (statement.getId() == 0) {
     expenceEntries = baseEntryRepository.getBaseEntries(Type.EXPENCE);
   } else {
     expenceEntries =
         baseEntryRepository.getMissingBaseEntriesForStatement(statement, Type.EXPENCE);
   }
   return expenceEntries;
 }
Пример #3
0
 public void saveBaseEntry() {
   baseEntryRepository.saveBaseEntry(baseEntry);
   FacesContext.getCurrentInstance()
       .addMessage(
           null, new FacesMessage(FacesMessage.SEVERITY_INFO, "Succes", "Post is opgeslagen."));
   baseEntry = new BaseEntry();
 }
Пример #4
0
 public void initEditForm() {
   if (id == 0) {
     baseEntry = new BaseEntry();
   } else {
     baseEntry = baseEntryRepository.getBaseEntry(id);
   }
   id = 0;
 }
Пример #5
0
 public void removeBaseEntry() {
   if (!baseEntryRepository.removeBaseEntry(baseEntry)) {
     FacesContext.getCurrentInstance()
         .addMessage(
             null,
             new FacesMessage(
                 FacesMessage.SEVERITY_FATAL,
                 "Fout",
                 "Het is niet gelukt om de post te verwijderen."));
   } else {
     FacesContext.getCurrentInstance()
         .addMessage(
             null, new FacesMessage(FacesMessage.SEVERITY_INFO, "Succes", "Post is verwijderd."));
   }
 }
Пример #6
0
 public List<BaseEntry> getBaseEntriesForExpence() {
   return baseEntryRepository.getBaseEntries(BaseEntry.Type.EXPENCE);
 }
Пример #7
0
 public List<BaseEntry> getBaseEntriesForIncome() {
   return baseEntryRepository.getBaseEntries(BaseEntry.Type.INCOME);
 }