}
@Override
public void updateFinalcosting(Finalcosting finalcosting, Integer finalcostingID) {
//Integer fcostingID = null;
Finalcosting newForm = finalcosting;
Finalcosting oldForm = null;
//Start by looking at Application Table. Application -> Travel ID -> ID Conference
// List<Application> allApp = daoApplication.findAll();
// for (Application eachApp : allApp) {
// if (eachApp.getFinalcostingIdfinalcosting().getIdfinalcosting().equals(finalcostingID)) {
// fcostingID = eachApp.getFinalcostingIdfinalcosting().getIdfinalcosting();
// }
// }
//Try and match conferenceID to passed id
List<Finalcosting> allFcostings = daoFinal.findAll();
for (Finalcosting eachfcost : allFcostings) {
if (eachfcost.getIdfinalcosting().equals(finalcostingID)) {
oldForm = eachfcost;
//move conferenceID of old conference entry to new entry.
newForm.setIdfinalcosting(oldForm.getIdfinalcosting());
daoFinal.edit(newForm);
}
}
//throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.