Last active
September 1, 2017 11:46
-
-
Save tanapoln/6716d456e05fcc9fbc6700420f54ab6f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Transactional | |
public void updateAllFriends() { | |
Collection<User> users = loadAllUsers(); | |
for (User user : users) { | |
Collection<User> friends = fetchFriends(user); | |
user.getFriends().addAll(friends); | |
user.setLastUpdateTime(new Date()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment