seqmgrbean.java
来自「该HttpProxy用于从Applet或Swing界面中访问Ejb和服务端的Ja」· Java 代码 · 共 92 行
JAVA
92 行
/*
* Created on 2005-6-29
*
* To change the template for this generated file go to
* Window - Preferences - Java - Code Generation - Code and Comments
*/
package com.nari.pmos.ejb.seqmgr;
import javax.ejb.SessionBean;
import javax.ejb.SessionContext;
import com.nari.pmos.common.utilities.SequenceMgr;
/**
* @author hujun
*
* To change the template for this generated type comment go to Window -
* Preferences - Java - Code Generation - Code and Comments
*/
public class SeqmgrBean implements SessionBean {
private javax.ejb.SessionContext mySessionCtx;
private SequenceMgr seqMgr = null;
public void ejbActivate() {
}
public void ejbRemove() {
seqMgr = null;
}
public void ejbPassivate() {
}
/**
* Sets the session context.
*
* @param SessionContext
*/
public void setSessionContext(SessionContext ctx) {
mySessionCtx = ctx;
}
public javax.ejb.SessionContext getSessionContext() {
return mySessionCtx;
}
/**
* This method corresponds to the create method in the home interface
* "interfaces.DemoHome.java". The parameter sets of the two methods are
* identical. When the client calls <code>DemoHome.create()</code>, the
* container allocates an instance of the EJBean and calls
* <code>ejbCreate()</code>.r
*/
public void ejbCreate() {
seqMgr = new SequenceMgr();
}
// ---------------------------------------------------------------------
public Long newResId() {
Long r = new Long(seqMgr.newResId());
return r;
}
/*
* 获得一个新的部门id,部门,组,角色,人员统一编号
*/
public Long newDepId() {
Long r = new Long(seqMgr.newDepId());
return r;
}
public Long newGroupId() {
Long r = new Long(seqMgr.newGroupId());
return r;
}
public Long newRoleId() {
Long r = new Long(seqMgr.newRoleId());
return r;
}
public Long newUserId() {
Long r = new Long(seqMgr.newUserId());
return r;
}
// ---------------------------------------------------------------------
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?