throw new NullPointerException("fetchedNumber.phoneId is null"); //NOI18N
}
- // Debug message
- this.getLoggerBeanLocal().logDebug(MessageFormat.format("getDetached: fetchedNumber.phoneId={0}", fetchedNumber.getMobileId())); //NOI18N
-
- // Init query instance
- final DialableMobileNumber foundNumber = this.getEntityManager().find(fetchedNumber.getClass(), fetchedNumber.getMobileId());
-
- // Debug message
- this.getLoggerBeanLocal().logDebug(MessageFormat.format("getDetached: foundNumber={0}", foundNumber)); //NOI18N
-
- // Default is null
- DialableMobileNumber detachedNumber = null;
-
- // Is there a difference?
- if (!MobileNumbers.isSameMobileNumber(mobileNumber, fetchedNumber)) {
- // @TODO Copy all to foundNumber, then merge
-
- // Merge this entry
- detachedNumber = this.getEntityManager().merge(foundNumber);
- }
+ // Get contact from it and find it
+ final BranchOffice foundBranchOffice = this.getEntityManager().find(detachedBranchOffice.getClass(), detachedBranchOffice.getBranchId());
// Trace message
this.getLoggerBeanLocal().logTrace(MessageFormat.format("getDetached: detachedNumber={0} - EXIT!", detachedNumber)); //NOI18N
detachedNumber = this.getEntityManager().merge(foundNumber);
}
+ // Set updated timestamp
+ managedBranchOffice.setBranchEntryUpdated(new Date());
+
// Trace message
this.getLoggerBeanLocal().logTrace(MessageFormat.format("getDetached: detachedNumber={0} - EXIT!", detachedNumber)); //NOI18N
throw new IllegalStateException(MessageFormat.format("detachedContact.contactId={0} is not valid.", detachedContact.getContactId())); //NOI18N
}
- // Set updated timestamp
- detachedContact.setContactEntryUpdated(new Date());
-
// Get contact from it and find it
final Contact foundContact = this.createManaged(detachedContact);
// Merge contact instance
final Contact managedContact = this.getEntityManager().merge(foundContact);
+ // Set updated timestamp
+ managedContact.setContactEntryUpdated(new Date());
+
// Trace message
this.getLoggerBeanLocal().logTrace(MessageFormat.format("mergeContactData: managedContact={0} - EXIT!", managedContact)); //NOI18N
throw new IllegalStateException(MessageFormat.format("detachedDepartment.departmentId ={0} is not valid.", detachedDepartment.getDepartmentId())); //NOI18N
}
- // Set updated timestamp
- detachedDepartment.setDepartmentEntryUpdated(new Date());
-
// Get contact from it and find it
final Department foundDepartment = this.createManaged(detachedDepartment);
// Merge contact instance
final Department managedDepartment = this.getEntityManager().merge(foundDepartment);
+ // Set updated timestamp
+ managedDepartment.setDepartmentEntryUpdated(new Date());
+
// Trace message
this.getLoggerBeanLocal().logTrace(MessageFormat.format("mergeDepartmentData: managedDepartment={0} - EXIT!", managedDepartment)); //NOI18N