📄 seqmgrbean.java
字号:
/*
* 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -