/* * StatusPanel.java * Copyright (C) 2004 Digital Globe, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package open.dolphin.infomodel; import javax.persistence.*; /** * StampTreeXML のホルダクラス。 * ユーザがインポートしているTreeクラス。 * * @author Kazushi Minagawa, Digital Globe, Inc. */ @Entity @Table(name="d_subscribed_tree") public class SubscribedTreeModel extends InfoModel implements java.io.Serializable { @Id @GeneratedValue(strategy=GenerationType.AUTO) private long id; //@ManyToOne(fetch = FetchType.LAZY) @ManyToOne @JoinColumn(name="user_id", nullable=false) private UserModel user; @Column(nullable=false) private long treeId; public long getId() { return id; } public void setId(long id) { this.id = id; } public long getTreeId() { return treeId; } public void setTreeId(long treeId) { this.treeId = treeId; } public UserModel getUserModel() { return user; } public void setUserModel(UserModel user) { this.user = user; } @Override public int hashCode() { final int PRIME = 31; int result = 1; result = PRIME * result + (int) (id ^ (id >>> 32)); return result; } @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 (id != other.id) return false; return true; } }