@Component(value="engine-db-table-cache") public class TableCache extends Object
| 构造器和说明 |
|---|
TableCache() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
clear() |
void |
clear(String datasourceName) |
boolean |
exist(String entityName)
判断是否存在实体
|
boolean |
exist(String datasource,
String entityName)
判断是否存在实体
|
EntityVO |
get(String entityName)
从缓存中获取实体
|
EntityVO |
get(String datasource,
String entityName)
从缓存中获取实体
|
static TableCache |
getInstance()
从容器中获取实例
|
List<EntityVO> |
list()
获取默认数据源的所有物理表列表
|
List<EntityVO> |
list(String datasourceName)
根据数据源获取物理表列表
|
void |
put(String entityName,
EntityVO entityVO)
添加实体到缓存中
|
void |
put(String datasource,
String entityName,
EntityVO entityVO)
添加实体到缓存中
|
void |
reload()
ee
重新加载实体到缓存
|
void |
reload(String tableName)
根据表名重新加载到缓存中
|
void |
reload(String datasourceName,
String tableName)
根据表名重新加载到缓存中
|
void |
reloadByDatasource(String datasourceName)
数据源名称
|
void |
remove(String entityName)
从缓存中删除实体
|
void |
remove(String datasource,
String entityName)
从缓存中删除表
|
public static TableCache getInstance()
public void clear(String datasourceName) throws SQLException
SQLExceptionpublic void clear()
public List<EntityVO> list() throws SQLException
SQLExceptionpublic List<EntityVO> list(String datasourceName) throws SQLException
datasourceName - SQLException@PostConstruct public void reload() throws SQLException
SQLExceptionpublic void reloadByDatasource(String datasourceName) throws SQLException
datasourceName - SQLExceptionpublic void reload(String datasourceName, String tableName) throws SQLException
tableName - SQLExceptionpublic void reload(String tableName) throws SQLException
tableName - SQLExceptionpublic void remove(String entityName)
entityName - 实体名称public void remove(String datasource, String entityName)
datasource - 数据源名称entityName - 实体名称public EntityVO get(String datasource, String entityName) throws SQLException
datasource - 数据源名称entityName - 实体名称SQLExceptionpublic EntityVO get(String entityName) throws SQLException
entityName - SQLExceptionpublic boolean exist(String entityName)
entityName - public void put(String datasource, String entityName, EntityVO entityVO)
entityName - entityVO - SQLExceptionpublic void put(String entityName, EntityVO entityVO) throws SQLException
entityName - entityVO - SQLExceptionCopyright © 2025. All rights reserved.