userrolebean.java

来自「老外的在线考试」· Java 代码 · 共 79 行

JAVA
79
字号
/* * UserEJB - CyberDemia's User management library implemented using EJBs. * Copyright (C) 2003 CyberDemia Research and Services * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA  02111-1307, USA. * * See the COPYING file located in the top-level-directory of * the archive of this library for complete text of license. */package com.cyberdemia.user.impl;import com.cyberdemia.user.*;import javax.ejb.*;/*** UserRoleBean implements mapping of a user to a role.* Users may have a many-to-many relationship with roles.* @author Alexander Yap*/public abstract class UserRoleBean extends AbstractEntityBean{	/**	* Sets the user id.	* The user id is an identifier for a user.	* @param id The user id.	*/	public abstract void setUserId(String id);	/**	* Gets the user id.	* The user id is an identifier for a user.	* @return The user id.	*/	public abstract String getUserId();	/**	* Sets the role name.	* @param role The role name.	*/	public abstract void setRoleName(String role);	/**	* Gets the role name.	* @return The role name.	*/	public abstract String getRoleName();	//-----------------------------	// Create methods.	//-----------------------------	public UserRoleKey ejbCreate( String userId, String roleName ) throws CreateException	{		setUserId(userId);		setRoleName( roleName );		return null;	}	public void ejbPostCreate( String userId, String roleName )	{	}}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?