From 39276f9a736757eeba2fac6e47658893109539e0 Mon Sep 17 00:00:00 2001 From: Jonathan Bernard Date: Mon, 4 Apr 2016 04:04:21 -0500 Subject: [PATCH] Make models cloneable. Set bookmark default play index. --- .../src/main/java/com/jdbernard/wdiwtlt/db/models/Bookmark.java | 2 +- core/src/main/java/com/jdbernard/wdiwtlt/db/models/Model.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/com/jdbernard/wdiwtlt/db/models/Bookmark.java b/core/src/main/java/com/jdbernard/wdiwtlt/db/models/Bookmark.java index 650e06f..32910ee 100644 --- a/core/src/main/java/com/jdbernard/wdiwtlt/db/models/Bookmark.java +++ b/core/src/main/java/com/jdbernard/wdiwtlt/db/models/Bookmark.java @@ -8,7 +8,7 @@ public class Bookmark extends Model { public String name; public UUID playlistId; public UUID mediaFileId; - public int playIndex; + public int playIndex = 0; public int playTimeMs = 0; public boolean userCreated; public Timestamp createdAt = new Timestamp(new Date().getTime()); diff --git a/core/src/main/java/com/jdbernard/wdiwtlt/db/models/Model.java b/core/src/main/java/com/jdbernard/wdiwtlt/db/models/Model.java index a3821d6..5fb86b5 100644 --- a/core/src/main/java/com/jdbernard/wdiwtlt/db/models/Model.java +++ b/core/src/main/java/com/jdbernard/wdiwtlt/db/models/Model.java @@ -4,7 +4,7 @@ import java.util.UUID; import javax.persistence.Entity; @Entity -public class Model implements Comparable { +public class Model implements Comparable, Cloneable { public UUID id; public boolean equals(Object thatObj) {