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