aboutsummaryrefslogtreecommitdiff
path: root/juick-server
diff options
context:
space:
mode:
authorGravatar Alexander Alexeev2016-11-21 13:37:53 +0700
committerGravatar Vitaly Takmazov2016-11-23 13:03:04 +0300
commite9aa20922c82bfad64adbcb6466ebdac23a84244 (patch)
tree9eb58c293fd7047f7b119d9f4937724a715b0ecd /juick-server
parent9d3b2623dac8fe3af4d0a8d05dad8ea96ea92f3d (diff)
field names for core objects are corrected ( standard name conventions used)
Diffstat (limited to 'juick-server')
-rw-r--r--juick-server/src/main/java/com/juick/server/UserQueries.java2
-rw-r--r--juick-server/src/main/java/com/juick/server/protocol/JuickProtocol.java8
-rw-r--r--juick-server/src/main/java/com/juick/service/UserServiceImpl.java4
3 files changed, 8 insertions, 6 deletions
diff --git a/juick-server/src/main/java/com/juick/server/UserQueries.java b/juick-server/src/main/java/com/juick/server/UserQueries.java
index 7400e6b2..e91cb6b3 100644
--- a/juick-server/src/main/java/com/juick/server/UserQueries.java
+++ b/juick-server/src/main/java/com/juick/server/UserQueries.java
@@ -152,7 +152,7 @@ public class UserQueries {
com.juick.User user = new com.juick.User();
user.setUid(rs.getInt(1));
user.setName(rs.getString(2));
- user.setJID(rs.getString(3));
+ user.setJid(rs.getString(3));
return user;
});
}
diff --git a/juick-server/src/main/java/com/juick/server/protocol/JuickProtocol.java b/juick-server/src/main/java/com/juick/server/protocol/JuickProtocol.java
index 6fa3790e..eb579712 100644
--- a/juick-server/src/main/java/com/juick/server/protocol/JuickProtocol.java
+++ b/juick-server/src/main/java/com/juick/server/protocol/JuickProtocol.java
@@ -248,16 +248,16 @@ public class JuickProtocol {
String retValUpdated;
if (input[0].toLowerCase().equals("on")) {
newStatus = UserQueries.ActiveStatus.Active;
- retValUpdated = "Notifications are activated for " + user.getJID();
+ retValUpdated = "Notifications are activated for " + user.getJid();
} else {
newStatus = UserQueries.ActiveStatus.Inactive;
- retValUpdated = "Notifications are disabled for " + user.getJID();
+ retValUpdated = "Notifications are disabled for " + user.getJid();
}
- if (UserQueries.setActiveStatusForJID(sql, user.getJID(), newStatus)) {
+ if (UserQueries.setActiveStatusForJID(sql, user.getJid(), newStatus)) {
return new ProtocolReply(retValUpdated, Optional.empty());
} else {
- return new ProtocolReply(String.format("Subscriptions status for %s was not changed", user.getJID()),
+ return new ProtocolReply(String.format("Subscriptions status for %s was not changed", user.getJid()),
Optional.empty());
}
}
diff --git a/juick-server/src/main/java/com/juick/service/UserServiceImpl.java b/juick-server/src/main/java/com/juick/service/UserServiceImpl.java
index 2c52582d..8bd3adef 100644
--- a/juick-server/src/main/java/com/juick/service/UserServiceImpl.java
+++ b/juick-server/src/main/java/com/juick/service/UserServiceImpl.java
@@ -33,9 +33,11 @@ public class UserServiceImpl extends BaseJdbcService implements UserService {
@Override
public User mapRow(ResultSet rs, int rowNum) throws SQLException {
User user = new User();
+
user.setUid(rs.getInt(1));
user.setName(rs.getString(2));
user.setBanned(rs.getBoolean(3));
+
return user;
}
}
@@ -174,7 +176,7 @@ public class UserServiceImpl extends BaseJdbcService implements UserService {
com.juick.User user = new com.juick.User();
user.setUid(rs.getInt(1));
user.setName(rs.getString(2));
- user.setJID(rs.getString(3));
+ user.setJid(rs.getString(3));
return user;
});
}