Personal project for managing photos I have wrote a small project for Android. It's an app which lets you to take a photo (or find one with Flickr) and save it in the cloud (Cloudinary).

Link to the GitHub repository.

Should MVP layers be completely separated? 

In the repository layer I have two DbPhoto classes (one for local database [SQLite] and one for cloud database [Firebase]), that are converted to Photo class in model. Photo class is used also in View. Should View has its own class?

DbPhoto for local database:

package org.chyla.photoapp.Repository.LocalDatabase.GreenDao.detail;

import org.greenrobot.greendao.DaoException;
import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Index;
import org.greenrobot.greendao.annotation.NotNull;
import org.greenrobot.greendao.annotation.ToOne;

@Entity(
        indexes = {
                @Index(value = "dbUserId,title,description,url", unique = true)
        }
)
public class DbPhoto {

    @Id
    private Long id;

    @NotNull
    private Long dbUserId;

    @ToOne(joinProperty = "dbUserId")
    private DbUser dbUser;

    @NotNull
    private String title;

    @NotNull
    private String description;

    @NotNull
    private String url;

/** Used to resolve relations */
@Generated(hash = 2040040024)
private transient DaoSession daoSession;

/** Used for active entity operations. */
@Generated(hash = 1256174471)
private transient DbPhotoDao myDao;

@Generated(hash = 1342142122)
public DbPhoto(Long id, @NotNull Long dbUserId, @NotNull String title,
        @NotNull String description, @NotNull String url) {
    this.id = id;
    this.dbUserId = dbUserId;
    this.title = title;
    this.description = description;
    this.url = url;
}

@Generated(hash = 95134667)
public DbPhoto() {
}

public Long getId() {
    return this.id;
}

public void setId(Long id) {
    this.id = id;
}

public String getTitle() {
    return this.title;
}

public void setTitle(String title) {
    this.title = title;
}

public String getDescription() {
    return this.description;
}

public void setDescription(String description) {
    this.description = description;
}

public String getUrl() {
    return this.url;
}

public void setUrl(String url) {
    this.url = url;
}

// ... (generated functions)


DbPhoto for cloud database:

package org.chyla.photoapp.Repository.CloudDatabase.Firebase.detail;

public class DbPhoto {

    public String title;
    public String description;
    public String url;

    public DbPhoto() {
    }

    public DbPhoto(String title, String description, String url) {
        this.title = title;
        this.description = description;
        this.url = url;
    }

}


Photo class for model and view:

package org.chyla.photoapp.Main.Model.objects;

import android.support.annotation.Nullable;

import java.net.URL;

public class Photo {

    private final String title;
    private final String description;
    private final URL url;

    public Photo(String title, @Nullable String description, URL url) {
        this.title = title;
        this.description = description;
        this.url = url;
    }

    public String getTitle() {
        return title;
    }

    public String getDescription() {
        if (description == null) {
            return "";
        }
        else {
            return description;
        }
    }

    public URL getUrl() {
        return url;
    }

}


I'm open to every suggestion improvements for my project.
Default description

public String getDescription() {
    if (description == null) {
        return "";
    }
    else {
        return description;
    }
}


Depending on how this method is used, it may make sense to take in a default value here, and return the default if the field is null, this may simplify code using this class.