throw new IllegalStateException(MessageFormat.format("detachedReceipt.receiptId={0} is not valid.", detachedReceipt.getReceiptId())); //NOI18N
}
- // Set updated timestamp
- detachedReceipt.setReceiptEntryUpdated(new Date());
-
// Get receipt from it and find it
final BillableReceipt foundReceipt = this.getEntityManager().find(detachedReceipt.getClass(), detachedReceipt.getReceiptId());
// Merge receipt instance
final BillableReceipt managedReceipt = this.getEntityManager().merge(foundReceipt);
+ // Should be there
+ assert (managedReceipt instanceof BillableReceipt) : "managedReceipt is null"; //NOI18N
+
+ // Set updated timestamp
+ managedReceipt.setReceiptEntryUpdated(new Date());
+
// Trace message
this.getLoggerBeanLocal().logTrace(MessageFormat.format("mergeReceipt: managedReceipt={0} - EXIT!", managedReceipt)); //NOI18N
throw new IllegalStateException(MessageFormat.format("detachedReceipt.itemId={0} is not valid.", detachedReceiptItem.getItemId())); //NOI18N
}
- // Set updated timestamp
- detachedReceiptItem.setItemEntryUpdated(new Date());
-
// Get receipt from it and find it
final BillableReceiptItem foundReceiptItem = this.getEntityManager().find(detachedReceiptItem.getClass(), detachedReceiptItem.getItemId());
// Merge receipt item instance
final BillableReceiptItem managedReceiptItem = this.getEntityManager().merge(foundReceiptItem);
+ // Should be there
+ assert (managedReceiptItem instanceof BillableReceiptItem) : "managedReceiptItem is null"; //NOI18N
+
+ // Set updated timestamp
+ managedReceiptItem.setItemEntryUpdated(new Date());
+
// Trace message
this.getLoggerBeanLocal().logTrace(MessageFormat.format("mergeReceiptItem: managedReceiptItem={0} - EXIT!", managedReceiptItem)); //NOI18N