Skip to content

Instantly share code, notes, and snippets.

@thatfiredev
Created June 15, 2017 14:15
Show Gist options
  • Select an option

  • Save thatfiredev/9285215811676abc4b01cb92074a819a to your computer and use it in GitHub Desktop.

Select an option

Save thatfiredev/9285215811676abc4b01cb92074a819a to your computer and use it in GitHub Desktop.
Utilizado no artigo Android Architecture Components - Room: https://medium.com/@rosariopfernandes/aac6-b46de8513df8
package io.github.rosariopfernandes.aac;
import android.arch.persistence.room.Entity;
import android.arch.persistence.room.PrimaryKey;
/**
* Created by rosariopfernandes on 6/9/17.
*/
@Entity
public class Tarefa {
@PrimaryKey(autoGenerate = true)
private int id;
private String titulo;
private String tarefa;
public Tarefa(){}
public Tarefa(int id, String titulo, String tarefa) {
this.id = id;
this.titulo = titulo;
this.tarefa = tarefa;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getTitulo() {
return titulo;
}
public void setTitulo(String titulo) {
this.titulo = titulo;
}
public String getTarefa() {
return tarefa;
}
public void setTarefa(String tarefa) {
this.tarefa = tarefa;
}
public String toString() {
return "Tarefa{" +
"id=" + id +
", titulo='" + titulo + '\'' +
", tarefa='" + tarefa + '\'' +
'}';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment