Remove deprecated

This commit is contained in:
Paulo Gustavo Veiga 2023-10-29 22:30:35 -07:00
parent eddd6899db
commit ae47d6fc33
3 changed files with 10 additions and 10 deletions

View File

@ -80,7 +80,7 @@ public class LabelManagerImpl
@Override
public void removeLabel(@NotNull Label label) {
getSession().delete(label);
getSession().remove(label);
}
@Nullable

View File

@ -117,13 +117,13 @@ public class MindmapManagerImpl
@Override
public void removeCollaboration(Collaboration collaboration) {
final Session session = getSession();
session.delete(collaboration);
session.remove(collaboration);
}
@Override
public void removeCollaborator(@NotNull Collaborator collaborator) {
final Session session = getSession();
session.delete(collaborator);
session.remove(collaborator);
}
@Override
@ -164,7 +164,7 @@ public class MindmapManagerImpl
@Override
public void updateMindmap(@NotNull Mindmap mindMap, boolean saveHistory) {
assert mindMap != null : "Save Mindmap: Mindmap is required!";
getSession().saveOrUpdate(mindMap);
getSession().merge(mindMap);
if (saveHistory) {
saveHistory(mindMap);
}
@ -186,7 +186,7 @@ public class MindmapManagerImpl
mindmap.removedCollaboration(mindmap.getCollaborations());
// Delete mindmap ....
getSession().delete(mindmap);
getSession().remove(mindmap);
}
private void saveHistory(@NotNull final Mindmap mindMap) {
@ -196,6 +196,6 @@ public class MindmapManagerImpl
history.setCreationTime(Calendar.getInstance());
history.setEditor(mindMap.getLastEditor());
history.setMindmapId(mindMap.getId());
getSession().saveOrUpdate(history);
getSession().merge(history);
}
}

View File

@ -134,13 +134,13 @@ public class UserManagerImpl
}
// Delete old user ...
session.delete(collaborator);
session.remove(collaborator);
return user;
}
@Override
public void removeUser(@NotNull final User user) {
getSession().delete(user);
getSession().remove(user);
}
public void auditLogin(@NotNull AccessAuditory accessAuditory) {
@ -166,12 +166,12 @@ public class UserManagerImpl
final SelectionQuery<User> query = getSession().createSelectionQuery("from com.wisemapping.model.User user where " +
"activationCode=:activationCode", User.class);
query.setParameter("activationCode", code);
final List users = query.list();
final List<User> users = query.getResultList();
if (users != null && !users.isEmpty()) {
assert users.size() == 1 : "More than one user with the same username!";
user = (User) users.get(0);
user = users.get(0);
} else {
user = null;
}