/** * Copyright 1999-2009 The Pegadi Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * Created on Sep 28, 2004 * * @author Jørgen Binningsbø <jb at pvv dot org> */ package org.pegadi.model; import java.io.Serializable; /** * @author jb * @author Erlend Hamnaberg<erlenha@underdusken.no> * $Id$ */ public class Role implements Serializable { /** * Unique identifier for the role. */ private Integer id; /** * The name of this role. */ private String name; /** * Integer used for sorting the role in various lists. */ private Integer orderBy; public Role(Integer id) { this.id = id; } /** * Required by hibernate */ public Role() { } /** * @return Returns the id. */ public Integer getId() { return id; } /** * @param id The id to set. */ public void setId(Integer id) { this.id = id; } /** * @return Returns the name. */ public String getName() { return name; } /** * @param name The name to set. */ public void setName(String name) { this.name = name; } /** * @return Returns the orderBy. */ public Integer getOrderBy() { return orderBy; } /** * @param orderBy The orderBy to set. */ public void setOrderBy(Integer orderBy) { this.orderBy = orderBy; } /** * Clone this object. Will perform a deep clone. * * @return The clone. */ public Object clone() { Role r = new Role(); r.id = id == null ? null : id; r.name = name == null ? null : name; r.orderBy = orderBy == null ? null : orderBy; return r; } }