sessioncontext.java

来自「一个完整的网络订餐系统」· Java 代码 · 共 95 行

JAVA
95
字号
package com.common;

public class SessionContext {
  private String UserID;
  private String UserName;
  private int nRole;
  private String ownCompId;
  private String curRoleID;
  private String roleName;
  private String storeID;
  private String storeName;

  public SessionContext() {
    UserID = "";
    UserName = "";
    nRole = 0;
    storeID = "";
  }

  public SessionContext(String storeID,String storeName)
  {
    setStoreID(storeID);
    setStoreName(storeName);
  }

  public void setUser(String UserID, int nRole) {
    this.UserID = UserID;
    this.nRole = nRole;
  }

  public void setUser(String UserID, String UserName, int nRole) {
    this.UserID = UserID;
    this.UserName = UserName;
    this.nRole = nRole;
  }

  public void setUser(String UserID, String UserName, int nRole, String ownComp) {
    this.UserID = UserID;
    this.UserName = UserName;
    this.nRole = nRole;
    this.ownCompId = ownComp;
  }

  public void setUser(String UserID, String UserName, String roleID,
                      String roleName, String ownComp) {
    this.UserID = UserID;
    this.UserName = UserName;
    this.curRoleID = roleID;
    this.ownCompId = ownComp;
    this.roleName = roleName;
  }

  public String getUserName() {
    return UserName;
  }

  public String getUserID() {
    return UserID;
  }

  public int getUserRole() {
    return nRole;
  }

  public String getOwnCompId() {
    return ownCompId;
  }

  public String getCurRoleID() {
    return curRoleID;
  }

  public void setCurRoleID(String curRoleID) {
    this.curRoleID = curRoleID;
  }

  public String getRoleName() {
    return roleName;
  }
  public String getStoreID() {
    return storeID;
  }

  public void setStoreID(String storeID) {
    this.storeID = storeID;
  }
  public void setStoreName(String storeName) {
    this.storeName = storeName;
  }
  public String getStoreName() {
    return storeName;
  }
}

⌨️ 快捷键说明

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