예제 #1
0
 // todo needed in the model document
 public void registerPeer(User user, String uuid, String ipAddress) {
   Assert.notNull(user);
   Assert.notNull(uuid);
   Assert.notNull(ipAddress);
   Peer peer = new Peer();
   peer.setUser(user);
   peer.setUuid(uuid);
   peer.setIpAddress(ipAddress);
   save(peer);
 }
예제 #2
0
 // todo needed in the model document
 public void offlinePeer(Peer peer) {
   Assert.notNull(peer);
   peer.setOnline(false);
   save(peer);
 }
예제 #3
0
 // todo needed in the model document
 public void onlinePeer(Peer peer) {
   Assert.notNull(peer);
   peer.setOnline(true);
   save(peer);
 }
예제 #4
0
 @Transactional
 public User getUser(Peer peer) {
   return peer.getUser();
 }