// Path: src/main/java/com/yyqian/imagine/dto/UserCreateForm.java
// public class UserCreateForm {
// 
//   @NotEmpty
//   private String username = "";
// 
//   @NotEmpty
//   private String password = "";
// 
//   @NotEmpty
//   private String passwordRepeated = "";
// 
//   public UserCreateForm() {
//   }
// 
//   public String getUsername() {
//     return username;
//   }
// 
//   public void setUsername(String username) {
//     this.username = username.trim();
//   }
// 
//   public String getPassword() {
//     return password;
//   }
// 
//   public void setPassword(String password) {
//     this.password = password.trim();
//   }
// 
//   public String getPasswordRepeated() {
//     return passwordRepeated;
//   }
// 
//   public void setPasswordRepeated(String passwordRepeated) {
//     this.passwordRepeated = passwordRepeated.trim();
//   }
// 
// }
// 
// Path: src/main/java/com/yyqian/imagine/dto/UserUpdateForm.java
// public class UserUpdateForm {
// 
//   private String email = "";
// 
//   private String about = "";
// 
//   public UserUpdateForm() {
//   }
// 
//   public String getEmail() {
//     return email;
//   }
// 
//   public void setEmail(String email) {
//     this.email = email.trim();
//   }
// 
//   public String getAbout() {
//     return about;
//   }
// 
//   public void setAbout(String about) {
//     this.about = about.trim();
//   }
// 
// }
// 
// Path: src/main/java/com/yyqian/imagine/service/CommentService.java
// public interface CommentService {
// 
//   Comment create(Comment comment);
// 
//   Comment create(CommentCreateForm form);
// 
//   Comment update(Comment comment);
// 
//   Optional<Comment> getCommentById(long id);
// 
//   Collection<Comment> getCommentTreeByPost(Post post);
// 
//   Page<Comment> getCommentListByPage(Pageable pageable);
// 
//   Collection<Comment> getCommentListByCurrentUser();
// 
// }
// 
// Path: src/main/java/com/yyqian/imagine/service/PostService.java
// public interface PostService {
//   Optional<Post> getPostById(long id);
// 
//   Page<Post> getPostListByPage(Pageable pageable);
// 
//   Collection<Post> getPostListBySite(String site);
// 
//   Collection<Post> getPostListByCurrentUser();
// 
//   Post create(Post post);
// 
//   Post create(PostCreateForm form);
// 
//   Post update(Post post);
// 
// }
// 
// Path: src/main/java/com/yyqian/imagine/service/UserService.java
// public interface UserService {
// 
//   Optional<User> getUserById(long id);
// 
//   Optional<User> getUserByUsername(String username);
// 
//   Collection<User> getAllUsers();
// 
//   User create(UserCreateForm form);
// 
//   int increasePointByUserId(Long id);
// 
//   User update(UserUpdateForm form);
// 
//   User resetPassword(PasswordRestForm form);
// 
//   void sendRestPasswordEmail(String username);
// 
//   void authUserByToken(String token);
// 
// }
// 
// Path: src/main/java/com/yyqian/imagine/service/VoteService.java
// public interface VoteService {
// 
//   PostVote createPostVote(PostVote postVote);
// 
//   CommentVote createCommentVote(CommentVote commentVote);
// 
//   PostVote upVotePostById(Long id);
// 
//   PostVote downVotePostById(Long id);
// 
//   CommentVote upVoteCommentById(Long id);
// 
//   CommentVote downVoteCommentById(Long id);
// 
//   boolean isPostVotedByCurrentUser(Post post);
// 
//   boolean isCommentVotedByCurrentUser(Comment comment);
// 
//   Collection<Post> getPostsVotedByCurrentUser();
// 
//   Collection<Comment> getCommentsVotedByCurrentUser();
// 
// }


import com.yyqian.imagine.dto.UserCreateForm;
import com.yyqian.imagine.dto.UserUpdateForm;
import com.yyqian.imagine.po.*;
import com.yyqian.imagine.service.CommentService;
import com.yyqian.imagine.service.PostService;
import com.yyqian.imagine.service.UserService;
import com.yyqian.imagine.service.VoteService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Component;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.IntStream;
package com.yyqian.imagine.utility;



/**
 * Created by yyqian on 12/5/15.
 * runs in dev env
 */
@Component
@Profile(value = {"dev", "debug"})
public class RockAndRoll implements CommandLineRunner {

  @Autowired
  private PostService postService;

  @Autowired
  private UserService userService;

  @Autowired
// Path: src/main/java/com/yyqian/imagine/dto/UserCreateForm.java
// public class UserCreateForm {
// 
//   @NotEmpty
//   private String username = "";
// 
//   @NotEmpty
//   private String password = "";
// 
//   @NotEmpty
//   private String passwordRepeated = "";
// 
//   public UserCreateForm() {
//   }
// 
//   public String getUsername() {
//     return username;
//   }
// 
//   public void setUsername(String username) {
//     this.username = username.trim();
//   }
// 
//   public String getPassword() {
//     return password;
//   }
// 
//   public void setPassword(String password) {
//     this.password = password.trim();
//   }
// 
//   public String getPasswordRepeated() {
//     return passwordRepeated;
//   }
// 
//   public void setPasswordRepeated(String passwordRepeated) {
//     this.passwordRepeated = passwordRepeated.trim();
//   }
// 
// }
// 
// Path: src/main/java/com/yyqian/imagine/dto/UserUpdateForm.java
// public class UserUpdateForm {
// 
//   private String email = "";
// 
//   private String about = "";
// 
//   public UserUpdateForm() {
//   }
// 
//   public String getEmail() {
//     return email;
//   }
// 
//   public void setEmail(String email) {
//     this.email = email.trim();
//   }
// 
//   public String getAbout() {
//     return about;
//   }
// 
//   public void setAbout(String about) {
//     this.about = about.trim();
//   }
// 
// }
// 
// Path: src/main/java/com/yyqian/imagine/service/CommentService.java
// public interface CommentService {
// 
//   Comment create(Comment comment);
// 
//   Comment create(CommentCreateForm form);
// 
//   Comment update(Comment comment);
// 
//   Optional<Comment> getCommentById(long id);
// 
//   Collection<Comment> getCommentTreeByPost(Post post);
// 
//   Page<Comment> getCommentListByPage(Pageable pageable);
// 
//   Collection<Comment> getCommentListByCurrentUser();
// 
// }
// 
// Path: src/main/java/com/yyqian/imagine/service/PostService.java
// public interface PostService {
//   Optional<Post> getPostById(long id);
// 
//   Page<Post> getPostListByPage(Pageable pageable);
// 
//   Collection<Post> getPostListBySite(String site);
// 
//   Collection<Post> getPostListByCurrentUser();
// 
//   Post create(Post post);
// 
//   Post create(PostCreateForm form);
// 
//   Post update(Post post);
// 
// }
// 
// Path: src/main/java/com/yyqian/imagine/service/UserService.java
// public interface UserService {
// 
//   Optional<User> getUserById(long id);
// 
//   Optional<User> getUserByUsername(String username);
// 
//   Collection<User> getAllUsers();
// 
//   User create(UserCreateForm form);
// 
//   int increasePointByUserId(Long id);
// 
//   User update(UserUpdateForm form);
// 
//   User resetPassword(PasswordRestForm form);
// 
//   void sendRestPasswordEmail(String username);
// 
//   void authUserByToken(String token);
// 
// }
// 
// Path: src/main/java/com/yyqian/imagine/service/VoteService.java
// public interface VoteService {
// 
//   PostVote createPostVote(PostVote postVote);
// 
//   CommentVote createCommentVote(CommentVote commentVote);
// 
//   PostVote upVotePostById(Long id);
// 
//   PostVote downVotePostById(Long id);
// 
//   CommentVote upVoteCommentById(Long id);
// 
//   CommentVote downVoteCommentById(Long id);
// 
//   boolean isPostVotedByCurrentUser(Post post);
// 
//   boolean isCommentVotedByCurrentUser(Comment comment);
// 
//   Collection<Post> getPostsVotedByCurrentUser();
// 
//   Collection<Comment> getCommentsVotedByCurrentUser();
// 
// }


// Path: src/main/java/com/yyqian/imagine/utility/RockAndRoll.java
import com.yyqian.imagine.dto.UserCreateForm;
import com.yyqian.imagine.dto.UserUpdateForm;
import com.yyqian.imagine.po.*;
import com.yyqian.imagine.service.CommentService;
import com.yyqian.imagine.service.PostService;
import com.yyqian.imagine.service.UserService;
import com.yyqian.imagine.service.VoteService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Component;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.IntStream;

package com.yyqian.imagine.utility;



/**
 * Created by yyqian on 12/5/15.
 * runs in dev env
 */
@Component
@Profile(value = {"dev", "debug"})
public class RockAndRoll implements CommandLineRunner {

  @Autowired
  private PostService postService;

  @Autowired
  private UserService userService;

  @Autowired
  private CommentService commentService;