Rethink
This commit is contained in:
parent
0e20bcfc9a
commit
66f90d3560
3 changed files with 4 additions and 4 deletions
|
|
@ -140,7 +140,7 @@ public class Rethink {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void pushServer(RethinkServer server) {
|
public void push(RethinkServer server) {
|
||||||
JSONObject object = new JSONObject();
|
JSONObject object = new JSONObject();
|
||||||
for (Field field : server.getClass().getDeclaredFields()) {
|
for (Field field : server.getClass().getDeclaredFields()) {
|
||||||
if (!field.getName().equals("rethink")) {
|
if (!field.getName().equals("rethink")) {
|
||||||
|
|
@ -154,7 +154,7 @@ public class Rethink {
|
||||||
r.table("server").get(server.getId()).update(object.toMap()).run(conn);
|
r.table("server").get(server.getId()).update(object.toMap()).run(conn);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void pushUser(RethinkUser user) {
|
public void push(RethinkUser user) {
|
||||||
JSONObject object = new JSONObject();
|
JSONObject object = new JSONObject();
|
||||||
for (Field field : user.getClass().getDeclaredFields()) {
|
for (Field field : user.getClass().getDeclaredFields()) {
|
||||||
if (!field.getName().equals("rethink")) {
|
if (!field.getName().equals("rethink")) {
|
||||||
|
|
|
||||||
|
|
@ -128,6 +128,6 @@ public class RethinkServer {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void push() {
|
public void push() {
|
||||||
rethink.pushServer(this);
|
rethink.push(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -76,6 +76,6 @@ public class RethinkUser {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void push() {
|
public void push() {
|
||||||
rethink.pushUser(this);
|
rethink.push(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue