}
});
+ private final Memoizer<Void> groupsMemoizer = new Memoizer<Void>(new Callable<Void>() {
+
+ @Override
+ public Void call() throws Exception {
+ if (!hasValue("groups")) {
+ value("groups", Collection.class).set(getGroupsByArtist(id()));
+ }
+ return null;
+ }
+
+ });
+
public LazyArtist(String id) {
super(id);
}
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Collection<Group> groups() {
+ groupsMemoizer.get();
+ return super.groups();
+ }
+
public Collection<Track> tracks() {
tracksMemoizer.get();
return super.tracks();