Package com.bolbachchan.blog.form.posts

Source Code of com.bolbachchan.blog.form.posts.NewPostForm

/**
*
*/
package com.bolbachchan.blog.form.posts;

import com.bolbachchan.blog.hibernate.domain.Posts;
import com.bolbachchan.blog.hibernate.domain.UserDetails;

/**
* @author Chaitanya
*
*/
public class NewPostForm {

    private Posts post;

    /**
     * @return the post
     */
    public Posts getPost() {
  if (post == null) {
      post = new Posts();
  }
  return post;
    }

    /**
     * @param post
     *            the post to set
     */
    public void setPost(Posts post) {
  this.post = post;
    }

    /**
     * @return
     */
    public String getPostTitle() {
  return getPost().getPostTitle();
    }

    /**
     * @param newPostTitle
     */
    public void setPostTitle(String postTitle) {
  getPost().setPostTitle(postTitle);
    }

    /**
     * @return
     */
    public String getPostContent() {
  return getPost().getPostContent();
    }

    /**
     * @param newPostContent
     */
    public void setPostContent(String postContent) {
  getPost().setPostContent(postContent);
    }

    /**
     * @return
     */
    public int getUserObjId() {
  return getPost().getUserDetails().getObjId();
    }

    /**
     * @param userObjId
     */
    public void setUserObjId(int userObjId) {
  getPost().setUserDetails(new UserDetails(userObjId));
    }
}
TOP

Related Classes of com.bolbachchan.blog.form.posts.NewPostForm

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.