public abstract class AbstractAlbum implements Album {
protected final String id;
+ protected final String parentId;
protected String title;
protected String description;
protected String albumImage;
- protected AbstractAlbum(String id) {
+ protected AbstractAlbum(String id, String parentId) {
this.id = checkNotNull(id, "id must not be null");
+ this.parentId = parentId;
}
@Override
@Override
public boolean isRoot() {
- return getParent() == null;
+ return parentId == null;
}
@Override
private final Database database;
private final Sone sone; /* TODO - only store sone ID. */
- private final String parentId;
protected DefaultAlbum(Database database, String id, Sone sone, String parentId) {
- super(id);
+ super(id, parentId);
this.database = database;
this.sone = sone;
- this.parentId = parentId;
}
@Override