* {@inheritDoc}
*/
@Override
- public String getUrl() {
- return getValue("url", String.class).get();
+ @SuppressWarnings("unchecked")
+ public Collection<Artist> getArtists() {
+ return getValue("artists", Collection.class).get();
}
/**
* {@inheritDoc}
*/
@Override
- public Group setUrl(String url) {
- getValue("url", String.class).set(url);
+ public Group setArtists(Collection<Artist> artists) {
+ getValue("artists", Collection.class).set(artists);
return this;
}
+ //
+ // OBJECT METHODS
+ //
+
/**
* {@inheritDoc}
*/
@Override
- @SuppressWarnings("unchecked")
- public Collection<Artist> getArtists() {
- return getValue("artists", Collection.class).get();
+ public int hashCode() {
+ return getId().hashCode();
}
/**
* {@inheritDoc}
*/
@Override
- public Group setArtists(Collection<Artist> artists) {
- getValue("artists", Collection.class).set(artists);
- return this;
+ public boolean equals(Object object) {
+ if (!(object instanceof Group)) {
+ return false;
+ }
+ return ((Group) object).getId().equals(getId());
}
}