package jp.sourceforge.shovel.entity.impl;

import org.seasar.dao.annotation.tiger.Bean;
import org.seasar.dao.annotation.tiger.Id;
import org.seasar.dao.annotation.tiger.IdType;

import jp.sourceforge.shovel.entity.IDirectMessage;
import jp.sourceforge.shovel.entity.IUser;

@Bean(table = "direct_messages")
public class DirectMessageImpl implements IDirectMessage {
    String body_;
    long directMessageId_;
    long recipientId_;
    long senderId_;
    long sentTime_;
    String source_;
    long sent_;
    long inbox_;
    
    public String getText() {
        return body_;
    }
    public void setText(String body) {
        body_ = body;
    }
    public long getDirectMessageId() {
        return directMessageId_;
    }
    @Id(value = IdType.IDENTITY)
    public void setDirectMessageId(long directMessageId) {
        directMessageId_ = directMessageId;
    }
    public long getRecipientId() {
        return recipientId_;
    }
    public void setRecipientId(long recipientId) {
        recipientId_ = recipientId;
    }
    public long getSenderId() {
        return senderId_;
    }
    public void setSenderId(long senderId) {
        senderId_ = senderId;
    }
    public long getSentTime() {
        return sentTime_;
    }
    public void setSentTime(long sentTime) {
        sentTime_ = sentTime;
    }
    public String getSource() {
        return source_;
    }
    public void setSource(String source) {
        source_ = source;
    }
    public long getSent() {
        return sent_;
    }
    public void setSent(long sent) {
        sent_ = sent;
    }
    public long getInbox() {
        return inbox_;
    }
    public void setInbox(long inbox) {
        inbox_ = inbox;
    }
    
    /////
    
    IUser sender_;
    IUser recipient_;
    
    public IUser getSender() {
        return sender_;
    }
    public void setSender(IUser sender) {
        sender_ = sender;
    }
    public IUser getRecipient() {
        return recipient_;
    }
    public void setRecipient(IUser recipient) {
        recipient_ = recipient;
    }
}
