diff --git a/src/main/java/org/ntlab/amaryllis/server/entities/Voicememo.java b/src/main/java/org/ntlab/amaryllis/server/entities/Voicememo.java index 008a105..0668568 100644 --- a/src/main/java/org/ntlab/amaryllis/server/entities/Voicememo.java +++ b/src/main/java/org/ntlab/amaryllis/server/entities/Voicememo.java @@ -1,84 +1,150 @@ package org.ntlab.amaryllis.server.entities; import java.util.ArrayList; +import java.util.Calendar; public class Voicememo { private String vid; private String uid; - private Integer upload; - private Integer time; - private String data; + private Calendar upload; + private Integer time;//型不明 + private String data;//型不明 private double latitude; private double longitude; private String title; private String summary; -// private Integer times; -// private ArrayList favolist; -// private Integer favos;//favoslistの要素数 -// private ArrayList categories; -// private ArrayList comments_commentNo; -// private ArrayList comments_uid; -// private ArrayList comments_comment; + private Integer times; + private ArrayList favolist; + private Integer favos;//favoslistの要素数 + private ArrayList categories; + private ArrayList comments_commentNo; + private ArrayList comments_uid; + private ArrayList comments_comment; - public Voicememo(String vid, String uid, Integer time, String data, double latitude, double longitude, String title, String summary){ + public Voicememo(String vid, String uid, Integer time, String data, double latitude, double longitude, String title, String summary) { + + Calendar upload = Calendar.getInstance(); + setVid(vid); setUid(uid); - //setUpload(投稿時間取得); + setUpload(upload); setTime(time); setData(data); setLatitude(latitude); setLongitude(longitude); setTitle(title); setSummary(summary); + this.times = 0; +// this.favos = 0; +// categories = new ArrayList<>(); +// comments_commentNo = new ArrayList<>(); +// comments_uid = new ArrayList<>(); +// comments_comment = new ArrayList<>(); + } - public String getVid(){ return vid; } - public void setVid(String vid) { + + public void editVoicememo(String title, String summary) { + setTitle(title); + setSummary(summary); + } + + + public String getVid() { + return vid; + } + + private void setVid(String vid) { this.vid = vid; } - public String getUid(){ return uid; } - public void setUid(String uid) { + private String getUid() { + return uid; + } + + private void setUid(String uid) { this.uid = uid; } - public Integer getUpload(){ return upload; } - public void setUpload(Integer upload) { + public Calendar getUpload() { + return upload; + } + + private void setUpload(Calendar upload) { this.upload = upload; } - public Integer getTime(){ return time; } - public void setTime(Integer time) { + public Integer getTime() { + return time; + } + + private void setTime(Integer time) { this.time = time; } - public String getData(){ return data; } - public void setData(String data) { - this.data= data; + public String getData() { + return data; } - public double getLatitude(){ return latitude; } - public void setLatitude(double latitude) { + private void setData(String data) { + this.data = data; + } + + public double getLatitude() { + return latitude; + } + + private void setLatitude(double latitude) { this.latitude = latitude; } - public double getLongitude(){ return longitude; } - public void setLongitude(double longitude) { + public double getLongitude() { + return longitude; + } + + private void setLongitude(double longitude) { this.longitude = longitude; } - public String getTitle(){ return title; } - public void setTitle(String title) { this.title = title; } + public String getTitle() { + return title; + } - public String getSummary(){ return summary; } - public void setSummary(String summary) {this.summary = summary; } + private void setTitle(String title) { + this.title = title; + } -// public Integer getTimes(){ return times; } -// public void setTimes(String times) { this.times = times; } -// + public String getSummary() { + return summary; + } + + private void setSummary(String summary) { + this.summary = summary; + } + + public String getTimes() { + return summary; + } + + public void addTimes() {//?どのタイミングで加算するか + times++; + } + // public ArrayList getFavolist(){ return favolist; } // +// public void checkFavo(String uid){ +// +// } +// +// private void addFavolist(String uid){ +// favolist.add(uid); +// calcFavos(); +// } +// // public Integer getFavos(){ return favos; } +// private void calcFavos(){ +// favos = favolist.size(); +// } // // public ArrayList getCategory(){ return categories; } //