Revision 48882
Added by Panagiotis Kanakakis over 6 years ago
InvoiceDAO.java | ||
---|---|---|
23 | 23 |
private Log logger = LogFactory.getLog(InvoiceDAO.class); |
24 | 24 |
|
25 | 25 |
public Invoice saveInvoice(Invoice invoice) { |
26 |
|
|
27 | 26 |
Invoice i = getByKey(invoice.getId()); |
28 |
Invoice i_merged = null; |
|
29 |
|
|
30 | 27 |
if(i!=null) { |
31 |
logger.debug("Merge invoice with id " + i.getId()); |
|
32 |
|
|
33 | 28 |
if(i.getFile()!=null) |
34 | 29 |
invoice.setFile(i.getFile()); |
35 |
|
|
36 |
logger.debug("Invoice file " + invoice.getFile()); |
|
37 |
|
|
38 |
i_merged = (Invoice) getSession().merge(invoice); |
|
30 |
Invoice persistened_invoice = (Invoice) getSession().merge(invoice); |
|
39 | 31 |
}else |
40 | 32 |
persist(invoice); |
41 | 33 |
|
Also available in: Unified diff
Delete logs from invoice dao