Migrate hibernate xml annotation to annotations
This commit is contained in:
@@ -29,9 +29,9 @@ public interface MindmapManager {
|
||||
|
||||
Collaborator findCollaborator(@NotNull String email);
|
||||
|
||||
Collaborator findCollaborator(long id);
|
||||
Collaborator findCollaborator(int id);
|
||||
|
||||
List<Collaboration> findCollaboration(final long collaboratorId);
|
||||
List<Collaboration> findCollaboration(final int collaboratorId);
|
||||
|
||||
List<Collaboration> findCollaboration(final CollaborationRole userRole);
|
||||
|
||||
@@ -46,15 +46,15 @@ public interface MindmapManager {
|
||||
|
||||
void addCollaborator(Collaborator collaborator);
|
||||
|
||||
void addMindmap(User user, Mindmap mindMap);
|
||||
void addMindmap(User user, Mindmap mindmap);
|
||||
|
||||
void saveMindmap(Mindmap mindMap);
|
||||
void saveMindmap(Mindmap mindmap);
|
||||
|
||||
void updateMindmap(@NotNull Mindmap mindMap, boolean saveHistory);
|
||||
void updateMindmap(@NotNull Mindmap mindmap, boolean saveHistory);
|
||||
|
||||
void removeCollaborator(@NotNull Collaborator collaborator);
|
||||
|
||||
void removeMindmap(Mindmap mindap);
|
||||
void removeMindmap(Mindmap mindmap);
|
||||
|
||||
void removeCollaboration(Collaboration collaboration);
|
||||
|
||||
|
||||
@@ -150,12 +150,12 @@ public class MindmapManagerImpl
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collaborator findCollaborator(long id) {
|
||||
public Collaborator findCollaborator(int id) {
|
||||
return getHibernateTemplate().get(Collaborator.class, id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Collaboration> findCollaboration(final long collaboratorId) {
|
||||
public List<Collaboration> findCollaboration(final int collaboratorId) {
|
||||
Query query = currentSession().createQuery("from com.wisemapping.model.Collaboration collaboration where colaborator_id=:colaboratorId");
|
||||
query.setParameter("colaboratorId", collaboratorId);
|
||||
return query.list();
|
||||
|
||||
@@ -31,7 +31,7 @@ public interface UserManager {
|
||||
|
||||
User getUserBy(String email);
|
||||
|
||||
User getUserBy(long id);
|
||||
User getUserBy(int id);
|
||||
|
||||
void createUser(User user);
|
||||
|
||||
|
||||
@@ -83,7 +83,8 @@ public class UserManagerImpl
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public User getUserBy(long id) {
|
||||
@Override
|
||||
public User getUserBy(int id) {
|
||||
User user = null;
|
||||
try {
|
||||
user = getHibernateTemplate().get(User.class, id);
|
||||
|
||||
Reference in New Issue
Block a user