类 SaSessionForJson

java.lang.Object
cn.dev33.satoken.session.SaSession
cn.dev33.satoken.dao.SaSessionForJson
所有已实现的接口:
cn.dev33.satoken.application.SaGetValueInterface, cn.dev33.satoken.application.SaSetValueInterface, Serializable

public class SaSessionForJson extends cn.dev33.satoken.session.SaSession
Snack3 定制版 SaSession,重写类型转换API
从以下版本开始:
1.34.0
作者:
noear
另请参阅:
  • 字段概要

    从类继承的字段 cn.dev33.satoken.session.SaSession

    PERMISSION_LIST, ROLE_LIST, USER
  • 构造器概要

    构造器
    构造器
    说明
     
    构建一个 SaSession 对象
  • 方法概要

    修饰符和类型
    方法
    说明
    <T> T
    getModel(String key, Class<T> cs)
    取值 (指定转换类型)
    <T> T
    getModel(String key, Class<T> cs, Object defaultValue)
    取值 (指定转换类型, 并指定值为Null时返回的默认值)
    long
    忽略 timeout 字段的序列化

    从类继承的方法 cn.dev33.satoken.session.SaSession

    addTokenSign, addTokenSign, clear, delete, get, getCreateTime, getDataMap, getId, getLoginId, getLoginType, getToken, getTokenSign, getTokenSignList, getTokenSignListByDevice, getTokenValueListByDevice, getType, keys, logout, logoutByTokenSignCountToZero, refreshDataMap, removeTokenSign, set, setByNull, setCreateTime, setId, setLoginId, setLoginType, setToken, setTokenSignList, setType, tokenSignListCopy, tokenSignListCopyByDevice, trans, update, updateMaxTimeout, updateMinTimeout, updateTimeout

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    从接口继承的方法 cn.dev33.satoken.application.SaGetValueInterface

    get, getDouble, getFloat, getInt, getLong, getString, getValueByDefaultValue, has, valueIsNull

    从接口继承的方法 cn.dev33.satoken.application.SaSetValueInterface

    get
  • 构造器详细资料

    • SaSessionForJson

      public SaSessionForJson()
    • SaSessionForJson

      public SaSessionForJson(String id)
      构建一个 SaSession 对象
      参数:
      id - Session 的 id
  • 方法详细资料

    • getModel

      public <T> T getModel(String key, Class<T> cs)
      取值 (指定转换类型)
      类型参数:
      T - 泛型
      参数:
      key - key
      cs - 指定转换类型
      返回:
    • getModel

      public <T> T getModel(String key, Class<T> cs, Object defaultValue)
      取值 (指定转换类型, 并指定值为Null时返回的默认值)
      类型参数:
      T - 泛型
      参数:
      key - key
      cs - 指定转换类型
      defaultValue - 值为Null时返回的默认值
      返回:
    • getTimeout

      public long getTimeout()
      忽略 timeout 字段的序列化
      覆盖:
      getTimeout 在类中 cn.dev33.satoken.session.SaSession