Make models cloneable. Set bookmark default play index.

This commit is contained in:
Jonathan Bernard 2016-04-04 04:04:21 -05:00
parent bc21abc24b
commit 39276f9a73
2 changed files with 2 additions and 2 deletions

View File

@ -8,7 +8,7 @@ public class Bookmark extends Model {
public String name; public String name;
public UUID playlistId; public UUID playlistId;
public UUID mediaFileId; public UUID mediaFileId;
public int playIndex; public int playIndex = 0;
public int playTimeMs = 0; public int playTimeMs = 0;
public boolean userCreated; public boolean userCreated;
public Timestamp createdAt = new Timestamp(new Date().getTime()); public Timestamp createdAt = new Timestamp(new Date().getTime());

View File

@ -4,7 +4,7 @@ import java.util.UUID;
import javax.persistence.Entity; import javax.persistence.Entity;
@Entity @Entity
public class Model implements Comparable<Model> { public class Model implements Comparable<Model>, Cloneable {
public UUID id; public UUID id;
public boolean equals(Object thatObj) { public boolean equals(Object thatObj) {