// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi 
// Source File Name:   MessageBoard.java

package com.keyshop.shop.content.model;

import com.keyshop.pub.model.PubBean;
import com.keyshop.pub.util.DateUtil;
import com.keyshop.shop.content.bo.MessageBoardBO;
import java.util.Iterator;
import java.util.List;

public class MessageBoard extends PubBean
{

    String author;
    String area;
    String email;
    String phone;
    String subject;
    String content;
    String parentId;
    String sex;
    String createTime;

    public MessageBoard()
    {
        author = "";
        area = "";
        email = "";
        phone = "";
        subject = "";
        content = "";
        parentId = "";
        sex = "";
        createTime = DateUtil.getSysDateTimeString();
    }

    public String getSubject()
    {
        return subject;
    }

    public String getParentId()
    {
        return parentId;
    }

    public String getPhone()
    {
        return phone;
    }

    public String getEmail()
    {
        return email;
    }

    public String getContent()
    {
        return content;
    }

    public String getCreateTime()
    {
        return createTime;
    }

    public String getAuthor()
    {
        return author;
    }

    public String getArea()
    {
        return area;
    }

    public void setArea(String area)
    {
        this.area = area;
    }

    public void setAuthor(String author)
    {
        this.author = author;
    }

    public void setCreateTime(String createTime)
    {
        this.createTime = createTime;
    }

    public void setContent(String content)
    {
        this.content = content;
    }

    public void setEmail(String email)
    {
        this.email = email;
    }

    public void setParentId(String parentId)
    {
        this.parentId = parentId;
    }

    public void setSubject(String subject)
    {
        this.subject = subject;
    }

    public void setPhone(String phone)
    {
        this.phone = phone;
    }

    public String getSex()
    {
        return sex;
    }

    public void setSex(String sex)
    {
        this.sex = sex;
    }

    public MessageBoard getReMessageBoard()
        throws Exception
    {
        String sql = " from MessageBoard as messageBoard where messageBoard.parentId='" + id + "'";
        MessageBoard messageBoard = null;
        MessageBoardBO bo = new MessageBoardBO();
        List list = bo.list(sql);
        if(list != null && list.size() > 0)
            messageBoard = (MessageBoard)list.iterator().next();
        return messageBoard;
    }
}
