Created
August 10, 2016 17:04
-
-
Save mplacona/d7ab036d1fbda5d57536326c7eff2cf1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Calendar; | |
import java.util.Date; | |
import java.util.UUID; | |
import io.realm.RealmModel; | |
import io.realm.annotations.PrimaryKey; | |
import io.realm.annotations.RealmClass; | |
@RealmClass | |
public class Note implements RealmModel { | |
@PrimaryKey | |
private String id = UUID.randomUUID().toString();; | |
private String text; | |
private Date date = new Date(java.text.DateFormat.getDateTimeInstance().format(Calendar.getInstance().getTime())); | |
public Note(){ } | |
public Note(String text) { this.text = text; } | |
public void setText(String text) { this.text = text; } | |
public String getText() { return text;} | |
public void setId(String id) { this.id = id; } | |
public String getId() { return id; } | |
public Date getDate() { return date; } | |
public void setDate(Date date) { this.date = date; } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment