mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-12-04 19:34:57 +01:00
Remove deprecated
This commit is contained in:
parent
eddd6899db
commit
ae47d6fc33
@ -80,7 +80,7 @@ public class LabelManagerImpl
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void removeLabel(@NotNull Label label) {
|
public void removeLabel(@NotNull Label label) {
|
||||||
getSession().delete(label);
|
getSession().remove(label);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
|
@ -117,13 +117,13 @@ public class MindmapManagerImpl
|
|||||||
@Override
|
@Override
|
||||||
public void removeCollaboration(Collaboration collaboration) {
|
public void removeCollaboration(Collaboration collaboration) {
|
||||||
final Session session = getSession();
|
final Session session = getSession();
|
||||||
session.delete(collaboration);
|
session.remove(collaboration);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void removeCollaborator(@NotNull Collaborator collaborator) {
|
public void removeCollaborator(@NotNull Collaborator collaborator) {
|
||||||
final Session session = getSession();
|
final Session session = getSession();
|
||||||
session.delete(collaborator);
|
session.remove(collaborator);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -164,7 +164,7 @@ public class MindmapManagerImpl
|
|||||||
@Override
|
@Override
|
||||||
public void updateMindmap(@NotNull Mindmap mindMap, boolean saveHistory) {
|
public void updateMindmap(@NotNull Mindmap mindMap, boolean saveHistory) {
|
||||||
assert mindMap != null : "Save Mindmap: Mindmap is required!";
|
assert mindMap != null : "Save Mindmap: Mindmap is required!";
|
||||||
getSession().saveOrUpdate(mindMap);
|
getSession().merge(mindMap);
|
||||||
if (saveHistory) {
|
if (saveHistory) {
|
||||||
saveHistory(mindMap);
|
saveHistory(mindMap);
|
||||||
}
|
}
|
||||||
@ -186,7 +186,7 @@ public class MindmapManagerImpl
|
|||||||
mindmap.removedCollaboration(mindmap.getCollaborations());
|
mindmap.removedCollaboration(mindmap.getCollaborations());
|
||||||
|
|
||||||
// Delete mindmap ....
|
// Delete mindmap ....
|
||||||
getSession().delete(mindmap);
|
getSession().remove(mindmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void saveHistory(@NotNull final Mindmap mindMap) {
|
private void saveHistory(@NotNull final Mindmap mindMap) {
|
||||||
@ -196,6 +196,6 @@ public class MindmapManagerImpl
|
|||||||
history.setCreationTime(Calendar.getInstance());
|
history.setCreationTime(Calendar.getInstance());
|
||||||
history.setEditor(mindMap.getLastEditor());
|
history.setEditor(mindMap.getLastEditor());
|
||||||
history.setMindmapId(mindMap.getId());
|
history.setMindmapId(mindMap.getId());
|
||||||
getSession().saveOrUpdate(history);
|
getSession().merge(history);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -134,13 +134,13 @@ public class UserManagerImpl
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Delete old user ...
|
// Delete old user ...
|
||||||
session.delete(collaborator);
|
session.remove(collaborator);
|
||||||
return user;
|
return user;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void removeUser(@NotNull final User user) {
|
public void removeUser(@NotNull final User user) {
|
||||||
getSession().delete(user);
|
getSession().remove(user);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void auditLogin(@NotNull AccessAuditory accessAuditory) {
|
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 " +
|
final SelectionQuery<User> query = getSession().createSelectionQuery("from com.wisemapping.model.User user where " +
|
||||||
"activationCode=:activationCode", User.class);
|
"activationCode=:activationCode", User.class);
|
||||||
query.setParameter("activationCode", code);
|
query.setParameter("activationCode", code);
|
||||||
final List users = query.list();
|
|
||||||
|
|
||||||
|
final List<User> users = query.getResultList();
|
||||||
if (users != null && !users.isEmpty()) {
|
if (users != null && !users.isEmpty()) {
|
||||||
|
|
||||||
assert users.size() == 1 : "More than one user with the same username!";
|
assert users.size() == 1 : "More than one user with the same username!";
|
||||||
user = (User) users.get(0);
|
user = users.get(0);
|
||||||
} else {
|
} else {
|
||||||
user = null;
|
user = null;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user