public abstract class BaseConsoleController extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
SESSION_KEY_SUFFIX_LOOKUP
每个controller的查询条件的session中的后缀
|
| 构造器和说明 |
|---|
BaseConsoleController() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected javax.servlet.http.HttpSession |
currentSession()
当前线程中的session
|
protected Lookup |
getLookup(Lookup defaultLookup)
获得本controller的查询条件
|
protected Lookup |
getLookup(String prefix,
Lookup defaultLookup)
获得本controller的查询条件:存在不同的情况下通过前缀区分
|
protected <T> T |
getOrCreateSessionAttribute(String key,
Class<T> clazz)
获得session中的对象
|
protected <T> T |
getSessionAttribute(String key)
获取session中的对象 若当前无session则创建一个
|
protected void |
setLookup(Lookup lookup)
保存提交的查询条件
|
protected void |
setLookup(Lookup lookup,
String prefix)
保存提交的查询条件: 存在多个不同的查询条件的时候根据前缀区分
|
protected void |
setSessionAttribute(String key,
Object obj)
设置session
|
protected Lookup getLookup(Lookup defaultLookup) throws IllegalStateException
protected Lookup getLookup(String prefix, Lookup defaultLookup) throws IllegalStateException
protected void setLookup(Lookup lookup)
protected javax.servlet.http.HttpSession currentSession()
protected void setSessionAttribute(String key, Object obj) throws IllegalStateException
protected <T> T getSessionAttribute(String key) throws IllegalStateException
protected <T> T getOrCreateSessionAttribute(String key, Class<T> clazz) throws IllegalStateException
Copyright © 2022. All rights reserved.