Added newline at the end of PersistenceManager

This commit is contained in:
delvh 2020-02-18 16:36:31 +01:00
parent 47ca47a761
commit ca2fa5d1e2
1 changed files with 4 additions and 4 deletions

View File

@ -184,15 +184,15 @@ public class PersistenceManager {
* @since Envoy Server Standalone v0.1-alpha * @since Envoy Server Standalone v0.1-alpha
*/ */
public void addContact(long userId1, long userId2) { public void addContact(long userId1, long userId2) {
// Get users by ID // Get users by ID
User u1 = getUserById(userId1); User u1 = getUserById(userId1);
User u2 = getUserById(userId2); User u2 = getUserById(userId2);
// Add users to each others contact lists // Add users to each others contact lists
u1.getContacts().add(u2); u1.getContacts().add(u2);
u2.getContacts().add(u1); u2.getContacts().add(u1);
// Synchronize changes with the database // Synchronize changes with the database
transaction.begin(); transaction.begin();
entityManager.merge(u1); entityManager.merge(u1);
@ -226,4 +226,4 @@ public class PersistenceManager {
entityManager.remove(obj); entityManager.remove(obj);
transaction.commit(); transaction.commit();
} }
} }