Commit a922856a authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gaston

Rename column "name" of table "jiveGroup" to "groupName". JM-67


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@572 b35dd754-fafc-0310-a699-88a17e54d16e
parent 423125bf
...@@ -31,11 +31,11 @@ import java.util.Collection; ...@@ -31,11 +31,11 @@ import java.util.Collection;
public class DbGroupProvider implements GroupProvider { public class DbGroupProvider implements GroupProvider {
private static final String INSERT_GROUP = private static final String INSERT_GROUP =
"INSERT INTO jiveGroup (name, description) VALUES (?, ?)"; "INSERT INTO jiveGroup (groupName, description) VALUES (?, ?)";
private static final String SAVE_GROUP = private static final String SAVE_GROUP =
"UPDATE jiveGroup SET description=? WHERE name=?"; "UPDATE jiveGroup SET description=? WHERE groupName=?";
private static final String SET_GROUP_NAME_1 = private static final String SET_GROUP_NAME_1 =
"UPDATE jiveGroup SET name=? WHERE name=?"; "UPDATE jiveGroup SET groupName=? WHERE groupName=?";
private static final String SET_GROUP_NAME_2 = private static final String SET_GROUP_NAME_2 =
"UPDATE jiveGroupProp SET groupName=? WHERE groupName=?"; "UPDATE jiveGroupProp SET groupName=? WHERE groupName=?";
private static final String SET_GROUP_NAME_3 = private static final String SET_GROUP_NAME_3 =
...@@ -43,21 +43,21 @@ public class DbGroupProvider implements GroupProvider { ...@@ -43,21 +43,21 @@ public class DbGroupProvider implements GroupProvider {
private static final String DELETE_GROUP_USERS = private static final String DELETE_GROUP_USERS =
"DELETE FROM jiveGroupUser WHERE groupName=?"; "DELETE FROM jiveGroupUser WHERE groupName=?";
private static final String DELETE_GROUP = private static final String DELETE_GROUP =
"DELETE FROM jiveGroup WHERE name=?"; "DELETE FROM jiveGroup WHERE groupName=?";
private static final String GROUP_COUNT = "SELECT count(*) FROM jiveGroup"; private static final String GROUP_COUNT = "SELECT count(*) FROM jiveGroup";
private static final String LOAD_ADMINS = private static final String LOAD_ADMINS =
"SELECT username FROM jiveGroupUser WHERE administrator=1 AND groupName=?"; "SELECT username FROM jiveGroupUser WHERE administrator=1 AND groupName=?";
private static final String LOAD_MEMBERS = private static final String LOAD_MEMBERS =
"SELECT username FROM jiveGroupUser WHERE administrator=0 AND groupName=?"; "SELECT username FROM jiveGroupUser WHERE administrator=0 AND groupName=?";
private static final String SELECT_GROUP_BY_NAME = private static final String SELECT_GROUP_BY_NAME =
"SELECT description FROM jiveGroup WHERE name=?"; "SELECT description FROM jiveGroup WHERE groupName=?";
private static final String REMOVE_USER = private static final String REMOVE_USER =
"DELETE FROM jiveGroupUser WHERE groupName=? AND username=?"; "DELETE FROM jiveGroupUser WHERE groupName=? AND username=?";
private static final String ADD_USER = private static final String ADD_USER =
"INSERT INTO jiveGroupUser (groupName, username, administrator) VALUES (?, ?, ?)"; "INSERT INTO jiveGroupUser (groupName, username, administrator) VALUES (?, ?, ?)";
private static final String USER_GROUPS = private static final String USER_GROUPS =
"SELECT groupName FROM jiveGroupUser WHERE username=?"; "SELECT groupName FROM jiveGroupUser WHERE username=?";
private static final String ALL_GROUPS = "SELECT name FROM jiveGroup ORDER BY name"; private static final String ALL_GROUPS = "SELECT groupName FROM jiveGroup ORDER BY groupName";
public Group createGroup(String name) throws GroupAlreadyExistsException { public Group createGroup(String name) throws GroupAlreadyExistsException {
Connection con = null; Connection con = null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment