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 org.seasar.framework.container.annotation.tiger.Binding;
import org.seasar.framework.container.annotation.tiger.BindingType;

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

@Bean(table = "friendships")
public class FriendshipImpl implements IFriendship {
    long activeId_;
    boolean accept_;
    long createdTime_;
    long friendshipId_;
    boolean notify_;
    long passiveId_;
    long removedTime_;
    
    public boolean isAccept() {
        return accept_;
    }
    public void setAccept(boolean accept) {
        accept_ = accept;
    }
    public long getActiveId() {
        return activeId_;
    }
    public void setActiveId(long activeId) {
        activeId_ = activeId;
    }
    public long getCreatedTime() {
        return createdTime_;
    }
    public void setCreatedTime(long createdTime) {
        createdTime_ = createdTime;
    }
    @Id(value = IdType.IDENTITY)
    public long getFriendshipId() {
        return friendshipId_;
    }
    public void setFriendshipId(long friendshipId) {
        friendshipId_ = friendshipId;
    }
    public boolean isNotify() {
        return notify_;
    }
    public void setNotify(boolean notify) {
        notify_ = notify;
    }
    public long getPassiveId() {
        return passiveId_;
    }
    public void setPassiveId(long passiveId) {
        passiveId_ = passiveId;
    }
    public long getRemovedTime() {
        return removedTime_;
    }
    public void setRemovedTime(long removedTime) {
        removedTime_ = removedTime;
    }
    
    /////
    
    IFriendship friend_;
    IFriendship follower_;
    
    public IFriendship getFriend() {
        return friend_;
    }
    @Binding(bindingType=BindingType.NONE)
    public void setFriend(IFriendship friend) {
        friend_ = friend;
    }
    public IFriendship getFollower() {
        return follower_;
    }
    @Binding(bindingType=BindingType.NONE)
    public void setFollower(IFriendship follower) {
        follower_ = follower;
    }
    
    /////
    
    IUser active_;
    IUser passive_;
    
    public IUser getActive() {
        return active_;
    }
    @Binding(bindingType=BindingType.NONE)
    public void setActive(IUser active) {
        active_ = active;
    }
    public IUser getPassive() {
        return passive_;
    }
    @Binding(bindingType=BindingType.NONE)
    public void setPassive(IUser passive) {
        passive_ = passive;
    }
}
