public class ShardingJdbcUpdateImpl extends AbstractJdbcUpdate implements IShardingUpdate
| Modifier and Type | Field and Description |
|---|---|
static org.slf4j.Logger |
LOG
日志.
|
dbCluster, idGenerator, primaryCache, secondCache| Constructor and Description |
|---|
ShardingJdbcUpdateImpl() |
| Modifier and Type | Method and Description |
|---|---|
private DB |
_getDbFromMaster(String tableName,
IShardingKey<?> shardingKey)
路由选择.
|
void |
removeByPk(Number pk,
IShardingKey<?> shardingKey,
Class<?> clazz)
根据主键删除数据.
|
void |
removeByPks(List<? extends Number> pks,
IShardingKey<?> shardingKey,
Class<?> clazz)
根据主键批量删除数据.
|
Number |
save(Object entity,
IShardingKey shardingKey)
保存数据.
|
Number[] |
saveBatch(List<? extends Object> entities,
IShardingKey<?> shardingKey)
批量保存数据.
|
void |
update(Object entity,
IShardingKey<?> shardingKey)
更新数据.
|
void |
updateBatch(List<? extends Object> entities,
IShardingKey<?> shardingKey)
单数据库多数据批量更新.
|
_removeByPks, _saveBatch, _updateBatch, getDBCluster, getIdGenerator, getPrimaryCache, getSecondCache, isCacheAvailable, isSecondCacheAvailable, setDBCluster, setIdGenerator, setPrimaryCache, setSecondCacheclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDBCluster, getIdGenerator, getPrimaryCache, getSecondCache, setDBCluster, setIdGenerator, setPrimaryCache, setSecondCachepublic Number save(Object entity, IShardingKey shardingKey)
IShardingUpdatesave in interface IShardingUpdateentity - 数据对象shardingKey - 分库分表因子public Number[] saveBatch(List<? extends Object> entities, IShardingKey<?> shardingKey)
IShardingUpdatesaveBatch in interface IShardingUpdateentities - 批量数据对象shardingKey - 分库分表因子public void update(Object entity, IShardingKey<?> shardingKey)
IShardingUpdateupdate in interface IShardingUpdateentity - 数据对象shardingKey - 分库分表因子public void updateBatch(List<? extends Object> entities, IShardingKey<?> shardingKey)
IShardingUpdateupdateBatch in interface IShardingUpdateentities - 批量更新数据shardingKey - 分库分表因子public void removeByPk(Number pk, IShardingKey<?> shardingKey, Class<?> clazz)
IShardingUpdateremoveByPk in interface IShardingUpdatepk - 主键shardingKey - 分库分表因子clazz - 数据对象classpublic void removeByPks(List<? extends Number> pks, IShardingKey<?> shardingKey, Class<?> clazz)
IShardingUpdateremoveByPks in interface IShardingUpdatepks - 主键shardingKey - 分库分表因子clazz - 数据对象classprivate DB _getDbFromMaster(String tableName, IShardingKey<?> shardingKey)
clazz - 数据对象shardingKey - 路由因子Copyright © 2015. All rights reserved.