package open.dolphin.infomodel;
// Generated 2010/06/30 10:57:59 by Hibernate Tools 3.2.1.GA

import open.dolphin.queries.DolphinQuery;

/**
 * 公開ツリー MEMO:マッピング d_subscribed_tree
 * SubscribedTreeModel generated by hbm2java
 */
public class SubscribedTreeModel extends InfoModel {

    private long id;//MEMO:Refrection
    private UserModel user;//MEMO:Refrection
    private long treeId;//MEMO:Refrection

    /**
     *　コンストラクタ
     */
    public SubscribedTreeModel() {
    }

    /**
     * 検索 MEMO:何もしない
     * @param query
     * @return false
     */
    @Override
    public boolean search(DolphinQuery query) {
        return false;
    }

    /**
     * IDのGetter
     * MEMO:Refrection
     * @return
     */
    public long getId() {
        return this.id;
    }

    /**
     * IDのSetter
     * MEMO:Refrection
     * @param id
     */
    public void setId(long id) {
        this.id = id;
    }

    /**
     * ユーザのGetter
     * MEMO:Refrection
     * @return ユーザ
     */
    public UserModel getUser() {
        return this.user;
    }

    /**
     * ユーザのSetter
     * MEMO:Refrection
     * @param user ユーザ
     */
    public void setUser(UserModel user) {
        this.user = user;
    }

    /**
     * ツリーIDのGetter
     * MEMO:Refrection
     * @return ツリーID
     */
    public long getTreeId() {
        return this.treeId;
    }

    /**
     * ツリーIDのSetter
     * MEMO:Refrection
     * @param treeId ツリーID
     */
    public void setTreeId(long treeId) {
        this.treeId = treeId;
    }

    /**
     * ハッシュコード
     * @return ハッシュコード
     */
    @Override
    public int hashCode() {
        final int PRIME = 31;
        int result = 1;
        result = PRIME * result + (int) (id ^ (id >>> 32));
        return result;
    }

    /**
     * 比較
     * @param obj
     * @return obj 同じなら真
     */
    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final SubscribedTreeModel other = (SubscribedTreeModel) obj;
        if (getId() != other.getId()) {
            return false;
        }
        return true;
    }
}
