public abstract class AbstractJdbcUpdate extends Object implements IDataUpdate
| Modifier and Type | Field and Description |
|---|---|
protected IDBCluster |
dbCluster
数据库集群引用
|
protected IIdGenerator |
idGenerator
ID生成器
|
static org.slf4j.Logger |
LOG |
protected IPrimaryCache |
primaryCache
一级缓存引用.
|
protected ISecondCache |
secondCache
二级缓存引用.
|
| Constructor and Description |
|---|
AbstractJdbcUpdate() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
_removeByPks(Connection conn,
List<? extends Number> pks,
Class<?> clazz,
int tableIndex) |
protected void |
_saveBatch(Connection conn,
List<? extends Object> entities,
int tableIndex)
执行保存数据操作.
|
protected void |
_updateBatch(Connection conn,
List<? extends Object> entities,
int tableIndex) |
IDBCluster |
getDBCluster()
get db cluster.
|
IIdGenerator |
getIdGenerator()
get id generator.
|
IPrimaryCache |
getPrimaryCache()
get second cache.
|
ISecondCache |
getSecondCache()
get second cache.
|
protected boolean |
isCacheAvailable(Class<?> clazz)
判断一级缓存是否可用
|
protected boolean |
isSecondCacheAvailable(Class<?> clazz)
判断二级缓存是否可用
|
void |
setDBCluster(IDBCluster dbCluster)
set db cluster.
|
void |
setIdGenerator(IIdGenerator idGenerator)
set id generator.
|
void |
setPrimaryCache(IPrimaryCache primaryCache)
set primary cache.
|
void |
setSecondCache(ISecondCache secondCache)
set second cache.
|
public static final org.slf4j.Logger LOG
protected IDBCluster dbCluster
protected IIdGenerator idGenerator
protected IPrimaryCache primaryCache
protected ISecondCache secondCache
protected void _saveBatch(Connection conn, List<? extends Object> entities, int tableIndex)
conn - 数据库连接entities - 需要被保存的数据tableIndex - 分片表下标. 当-1时忽略下标protected void _removeByPks(Connection conn, List<? extends Number> pks, Class<?> clazz, int tableIndex)
tableIndex - 等于-1时会被忽略.protected void _updateBatch(Connection conn, List<? extends Object> entities, int tableIndex)
tableIndex - 等于-1时会被忽略.protected boolean isCacheAvailable(Class<?> clazz)
protected boolean isSecondCacheAvailable(Class<?> clazz)
public IDBCluster getDBCluster()
IDataUpdategetDBCluster in interface IDataUpdatepublic void setDBCluster(IDBCluster dbCluster)
IDataUpdatesetDBCluster in interface IDataUpdatepublic void setIdGenerator(IIdGenerator idGenerator)
IDataUpdatesetIdGenerator in interface IDataUpdatepublic IIdGenerator getIdGenerator()
IDataUpdategetIdGenerator in interface IDataUpdatepublic IPrimaryCache getPrimaryCache()
IDataUpdategetPrimaryCache in interface IDataUpdatepublic void setPrimaryCache(IPrimaryCache primaryCache)
IDataUpdatesetPrimaryCache in interface IDataUpdatepublic ISecondCache getSecondCache()
IDataUpdategetSecondCache in interface IDataUpdatepublic void setSecondCache(ISecondCache secondCache)
IDataUpdatesetSecondCache in interface IDataUpdateCopyright © 2015. All rights reserved.