Beispiel #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);
 }
Beispiel #2
0
 // todo needed in the model document
 public void offlinePeer(Peer peer) {
   Assert.notNull(peer);
   peer.setOnline(false);
   save(peer);
 }
Beispiel #3
0
 // todo needed in the model document
 public void onlinePeer(Peer peer) {
   Assert.notNull(peer);
   peer.setOnline(true);
   save(peer);
 }
Beispiel #4
0
 @Transactional
 public User getUser(Peer peer) {
   return peer.getUser();
 }