set user DbMapping on new user session objects
This commit is contained in:
parent
925918378d
commit
c3236be368
1 changed files with 3 additions and 0 deletions
|
@ -22,6 +22,7 @@ public class User implements Serializable {
|
||||||
String sessionID;
|
String sessionID;
|
||||||
String uid; // the unique id (login name) for the user, if logged in
|
String uid; // the unique id (login name) for the user, if logged in
|
||||||
NodeHandle nhandle;
|
NodeHandle nhandle;
|
||||||
|
DbMapping umap;
|
||||||
long onSince, lastTouched;
|
long onSince, lastTouched;
|
||||||
Node cache;
|
Node cache;
|
||||||
String message;
|
String message;
|
||||||
|
@ -31,8 +32,10 @@ public class User implements Serializable {
|
||||||
this.nhandle = null;
|
this.nhandle = null;
|
||||||
this.app = app;
|
this.app = app;
|
||||||
setNode (null);
|
setNode (null);
|
||||||
|
umap = app.getDbMapping ("user");
|
||||||
cache = new Node ("[session cache]");
|
cache = new Node ("[session cache]");
|
||||||
cache.setPrototype ("user");
|
cache.setPrototype ("user");
|
||||||
|
cache.setDbMapping (umap);
|
||||||
sessionID = sid;
|
sessionID = sid;
|
||||||
onSince = System.currentTimeMillis ();
|
onSince = System.currentTimeMillis ();
|
||||||
lastTouched = onSince;
|
lastTouched = onSince;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue