mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-14 18:57:56 +01:00
Remove deprecated
This commit is contained in:
parent
eddd6899db
commit
ae47d6fc33
@ -80,7 +80,7 @@ public class LabelManagerImpl
|
||||
|
||||
@Override
|
||||
public void removeLabel(@NotNull Label label) {
|
||||
getSession().delete(label);
|
||||
getSession().remove(label);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user