001: /******************************************************************************
002: * JBoss, a division of Red Hat *
003: * Copyright 2006, Red Hat Middleware, LLC, and individual *
004: * contributors as indicated by the @authors tag. See the *
005: * copyright.txt in the distribution for a full listing of *
006: * individual contributors. *
007: * *
008: * This is free software; you can redistribute it and/or modify it *
009: * under the terms of the GNU Lesser General Public License as *
010: * published by the Free Software Foundation; either version 2.1 of *
011: * the License, or (at your option) any later version. *
012: * *
013: * This software is distributed in the hope that it will be useful, *
014: * but WITHOUT ANY WARRANTY; without even the implied warranty of *
015: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
016: * Lesser General Public License for more details. *
017: * *
018: * You should have received a copy of the GNU Lesser General Public *
019: * License along with this software; if not, write to the Free *
020: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
021: * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
022: ******************************************************************************/package org.jboss.portal.migration.model24.identity;
023:
024: import java.util.HashSet;
025: import java.util.Set;
026:
027: /**
028: * @author <a href="mailto:julien@jboss.org">Julien Viet </a>
029: * @author <a href="mailto:theute@jboss.org">Thomas Heute </a>
030: * @author Roy Russo : roy at jboss dot org
031: * @version $Revision: 8784 $
032: */
033: public class Role24Impl implements Role {
034:
035: public Long key;
036: public String name;
037: public Set users;
038: public String displayName;
039:
040: /**
041: *
042: */
043: public Role24Impl() {
044: this .key = null;
045: this .name = null;
046: this .displayName = null;
047: this .users = new HashSet();
048: }
049:
050: /**
051: *
052: */
053: public Role24Impl(String name) {
054: this .key = null;
055: this .name = name;
056: this .displayName = name;
057: this .users = new HashSet();
058: }
059:
060: /**
061: *
062: */
063: public Role24Impl(String name, String displayName) {
064: this .key = null;
065: this .name = name;
066: this .displayName = displayName;
067: this .users = new HashSet();
068: }
069:
070: /**
071: * @hibernate.id column="jbp_rid" generator-class="native"
072: * <p/>
073: * Called by hibernate.
074: */
075: protected Long getKey() {
076: return key;
077: }
078:
079: /** Called by hibernate. */
080: protected void setKey(Long key) {
081: this .key = key;
082: }
083:
084: /** Called by hibernate. */
085: protected void setName(String name) {
086: this .name = name;
087: }
088:
089: /** Called by hibernate. */
090: protected void setUsers(Set users) {
091: this .users = users;
092: }
093:
094: // ******************************************************************************************************************
095:
096: public Object getId() {
097: return key;
098: }
099:
100: /**
101: *
102: */
103: public String getName() {
104: return name;
105: }
106:
107: /**
108: *
109: */
110: public String getDisplayName() {
111: return displayName;
112: }
113:
114: /**
115: *
116: */
117: public void setDisplayName(String displayName) {
118: this .displayName = displayName;
119: }
120:
121: /**
122: *
123: */
124: public Set getUsers() {
125: return users;
126: }
127:
128: public String toString() {
129: return "Role[" + key + "," + name + "]";
130: }
131: }
|