package at.fhj.swd14.pse.like;

import java.io.Serializable;

import at.fhj.swd14.pse.comment.CommentDto;
import at.fhj.swd14.pse.user.UserDto;
/**
 * DTO for a like of a comment.
 * @author Thomas
 *
 */
public class CommentLikeDto implements Serializable {

	private static final long serialVersionUID = 1L;
	
	private UserDto liker;
	private CommentDto likedComment;
	
	/**
     * Construct a new like for a comment.
     * @param liker The user, who likes the comment.
     * @param comment The comment, which is liked.
     */
    public CommentLikeDto(UserDto liker,CommentDto comment) {
    	this.liker = liker;
    	this.likedComment = comment;
    }
    /**
     * Sets the person who likes a comment.
     * @param liker The person who likes a comment.
     */
    public void setLiker(UserDto liker) {
    	this.liker = liker;
    }
    /**
     * Returns the liker of a comment.
     * @return The liker of a comment.
     */
    public UserDto getLiker() {
    	return this.liker;
    }
    /**
     * Sets the liked comment.
     * @param likedComment The comment to be liked.
     */
    public void setLikedComment(CommentDto likedComment) {
    	this.likedComment = likedComment;
    }
    /**
     * Returns the liked comment.
     * @return The liked comment.
     */
    public CommentDto getLikedComment() {
    	return this.likedComment;
    }
    
    @Override
    public String toString() {
    	StringBuffer sb = new StringBuffer();
    	sb.append("CommentLikeDto");
    	sb.append("   liker: " + this.liker.getId());
    	sb.append("   comment: " + this.likedComment.getId());
    	
    	return sb.toString();
    }
}

@@ -137,16 +137,17 @@
 serDto;%0A
+%0A
 /**%0A * D
@@ -174,16 +174,19 @@
 omment.%0A
+ *%0A
  * @auth
@@ -195,19 +195,16 @@
  Thomas%0A
- *%0A
  */%0Apubl
@@ -254,17 +254,20 @@
 able %7B%0A%0A
-%09
+    
 private 
@@ -307,19 +307,21 @@
 D = 1L;%0A
-%09%0A%09
+%0A    
 private 
@@ -335,17 +335,20 @@
  liker;%0A
-%09
+    
 private 
@@ -376,11 +376,13 @@
 nt;%0A
-%09%0A%09
+%0A    
 /**%0A
@@ -416,32 +416,39 @@
  for a comment.%0A
+     *%0A
      * @param li
@@ -447,24 +447,26 @@
 param liker 
+  
 The user, wh
@@ -585,16 +585,17 @@
 o liker,
+ 
 CommentD
@@ -604,33 +604,36 @@
  comment) %7B%0A    
-%09
+    
 this.liker = lik
@@ -636,25 +636,28 @@
  liker;%0A    
-%09
+    
 this.likedCo
@@ -671,32 +671,33 @@
  comment;%0A    %7D%0A
+%0A
     /**%0A     * S
@@ -724,32 +724,39 @@
 ikes a comment.%0A
+     *%0A
      * @param li
@@ -837,33 +837,36 @@
 to liker) %7B%0A    
-%09
+    
 this.liker = lik
@@ -867,32 +867,33 @@
  = liker;%0A    %7D%0A
+%0A
     /**%0A     * R
@@ -915,32 +915,39 @@
 r of a comment.%0A
+     *%0A
      * @return T
@@ -1005,33 +1005,36 @@
 etLiker() %7B%0A    
-%09
+    
 return this.like
@@ -1034,32 +1034,33 @@
 is.liker;%0A    %7D%0A
+%0A
     /**%0A     * S
@@ -1074,32 +1074,39 @@
  liked comment.%0A
+     *%0A
      * @param li
@@ -1212,17 +1212,20 @@
 ) %7B%0A    
-%09
+    
 this.lik
@@ -1252,24 +1252,25 @@
 ment;%0A    %7D%0A
+%0A
     /**%0A    
@@ -1291,32 +1291,39 @@
  liked comment.%0A
+     *%0A
      * @return T
@@ -1390,25 +1390,28 @@
 ent() %7B%0A    
-%09
+    
 return this.
@@ -1430,20 +1430,16 @@
 ;%0A    %7D%0A
-    
 %0A    @Ov
@@ -1484,62 +1484,19 @@
     
-%09StringBuffer sb = new StringBuffer();%0A    %09sb.append(
+    return 
 %22Com
@@ -1507,34 +1507,35 @@
 LikeDto%22
-);
+ +
 %0A    
-%09sb.append(
+            
 %22   like
@@ -1563,26 +1563,27 @@
 Id()
-);
+ +
 %0A    
-%09sb.append(
+            
 %22   
@@ -1624,42 +1624,8 @@
 Id()
-);%0A    %09%0A    %09return sb.toString()
 ;%0A  

remove unneccessary string buffer