diff --git a/src/main/java/org/ntlab/amaryllis/server/entities/Comment.java b/src/main/java/org/ntlab/amaryllis/server/entities/Comment.java index 933ecc2..8deb43d 100644 --- a/src/main/java/org/ntlab/amaryllis/server/entities/Comment.java +++ b/src/main/java/org/ntlab/amaryllis/server/entities/Comment.java @@ -2,23 +2,21 @@ import org.w3c.dom.Text; - import java.util.UUID; - import static java.util.UUID.randomUUID; public class Comment { - String cid;//commentId + String commentId; String uid; String text; public Comment(String uid, String text) { - this.cid = randomUUID().toString(); + this.commentId = randomUUID().toString(); this.uid = uid; this.text = text; } - public String getCid(){ return cid; } + public String getCid(){ return commentId; } public String getUid(){ return uid; } 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 dddf2dd..902f2a6 100644 --- a/src/main/java/org/ntlab/amaryllis/server/entities/Voicememo.java +++ b/src/main/java/org/ntlab/amaryllis/server/entities/Voicememo.java @@ -178,12 +178,9 @@ // // public ArrayList getComments(){ return comments; } // -// public Comment getComment(String cid) { -// if(cid.equals(null)){ -// return null; -// } +// public Comment getComment(String commentId) { // for (Comment a : comments) { -// if (a.getCid().equals(cid)) { +// if (a.getCid().equals(commentId)) { // return a; // } // } @@ -199,11 +196,8 @@ // return newComment; // } // -// public void removeComment(String cid) { -// if(cid.equals(null)){ -// return; -// } -// Comment removeComment = getComment(cid); +// public void removeComment(String commentId) { +// Comment removeComment = getComment(commentId); // comments.remove(removeComment); // }