portfolio/src/main/java/com/google/sps/data/Comment.java
/**
   * Returns a new Entity of kind "Comment" from a Comment object.
   * @param {Comment} comment - the Comment object that will be made into an
   *     Entity.
   */
Returns a new Entity of kind "Comment" from a Comment object.
@param {Comment} comment - the Comment object that will be made into an
Entity.
Returns a new Entity of kind " Comment " from a Comment object . @param { Comment } comment - the Comment object that will be made into an Entity .
public static Entity toEntity(Comment comment){
    Entity commentEntity = new Entity("Comment");
    commentEntity.setProperty("name", comment.name);
    commentEntity.setProperty("timeOfComment", comment.timeOfComment);
    commentEntity.setProperty("commentString", comment.commentString);
    commentEntity.setProperty("lengthOfComment", comment.commentString.length());
    return commentEntity;
  }
public static Entity toEntity ( Comment comment ) { Entity commentEntity = new Entity ( "Comment" ) ; commentEntity . setProperty ( "name" , comment . name ) ; commentEntity . setProperty ( "timeOfComment" , comment . timeOfComment ) ; commentEntity . setProperty ( "commentString" , comment . commentString ) ; commentEntity . setProperty ( "lengthOfComment" , comment . commentString . length ( ) ) ; return commentEntity ; }
Returns a new Entity of kind "Comment" from a Comment object.
Returns a new Entity of kind " Comment " from a Comment object .