diff --git a/src/main/java/org/ntlab/acanthus_server/entities/Animation.java b/src/main/java/org/ntlab/acanthus_server/entities/Animation.java index 42f0cd6..109b7d4 100644 --- a/src/main/java/org/ntlab/acanthus_server/entities/Animation.java +++ b/src/main/java/org/ntlab/acanthus_server/entities/Animation.java @@ -12,6 +12,7 @@ import org.ntlab.acanthus_server.entities.Position; import org.ntlab.acanthus_server.entities.Stroke; +import java.lang.reflect.Array; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; import java.util.ArrayList; @@ -38,7 +39,7 @@ @JsonProperty("hashTag") private ArrayList hashTag = new ArrayList<>(); @JsonProperty("pageMap") - private HashMap pageMap = new HashMap<>(); + private ArrayList pageMap = new ArrayList<>(); @JsonIgnore private Account owner; @JsonIgnore @@ -62,7 +63,7 @@ this.isPublic = false; this.owner = owner; this.editors.add(new Editor(owner, true)); - this.pageMap.put(0, new Page(1)); + this.pageMap.add(new Page(0, 1)); this.lastUpdate = date.format(dateTimeFormatter); } @@ -97,10 +98,6 @@ this.lastUpdate = dt.toString(); } - public void setPageMap(int pid, Page page) { - this.pageMap.put(pid, page); - } - //----------------------------------------------------------------- // add @@ -151,8 +148,8 @@ return lastUpdate; } - public HashMap getPageMap() { - return pageMap; + public ArrayList getPages() { + return this.pageMap; } //----------------------------------------------------------------- @@ -217,7 +214,7 @@ this.isPublic = false; this.owner = ownerAccount; this.editors.add(new Editor(owner, true)); - this.pageMap.put(0, new Page(1)); + this.pageMap.add(new Page(0, 1)); LocalDateTime date = LocalDateTime.now(); DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy/MM/dd HH:mm:ss");