public class ShardingJdbcUpdateImpl extends AbstractJdbcUpdate implements IShardingUpdate
| Modifier and Type | Field and Description |
|---|---|
static org.slf4j.Logger |
LOG
日志.
|
dbCluster, entityMetaManager, primaryCache, secondCache, txManager| Constructor and Description |
|---|
ShardingJdbcUpdateImpl() |
| Modifier and Type | Method and Description |
|---|---|
private ShardingDBResource |
_getDbFromMaster(String tableName,
IShardingKey<?> shardingKey)
路由选择.
|
void |
removeByPk(EntityPK pk,
IShardingKey<?> shardingKey,
Class<?> clazz)
根据主键删除数据.
|
void |
removeByPks(List<EntityPK> pks,
IShardingKey<?> shardingKey,
Class<?> clazz)
根据主键批量删除数据.
|
PKValue |
save(Object entity,
IShardingKey<?> shardingKey)
保存数据.
|
PKValue[] |
saveBatch(List<? extends Object> entities,
IShardingKey<?> shardingKey,
boolean autoGeneratedKeys)
批量保存数据.
|
void |
update(Object entity,
IShardingKey<?> shardingKey)
更新数据.
|
void |
updateBatch(List<? extends Object> entities,
IShardingKey<?> shardingKey)
单数据库多数据批量更新.
|
_removeByPks, _saveBatchWithAutoGeneratedKeys, _saveBatchWithoutAutoGeneratedKeys, _updateBatchfillParam, getDBCluster, getPrimaryCache, getSecondCache, getTransactionManager, isCacheAvailable, isCacheAvailable, isSecondCacheAvailable, isSecondCacheAvailable, setDBCluster, setPrimaryCache, setSecondCache, setTransactionManagerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDBCluster, getPrimaryCache, getSecondCache, getTransactionManager, setDBCluster, setPrimaryCache, setSecondCache, setTransactionManagerpublic PKValue save(Object entity, IShardingKey<?> shardingKey)
IShardingUpdatesave in interface IShardingUpdateentity - 数据对象shardingKey - 分库分表因子public PKValue[] saveBatch(List<? extends Object> entities, IShardingKey<?> shardingKey, boolean autoGeneratedKeys)
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(EntityPK pk, IShardingKey<?> shardingKey, Class<?> clazz)
IShardingUpdateremoveByPk in interface IShardingUpdatepk - 主键shardingKey - 分库分表因子clazz - 数据对象classpublic void removeByPks(List<EntityPK> pks, IShardingKey<?> shardingKey, Class<?> clazz)
IShardingUpdateremoveByPks in interface IShardingUpdatepks - 主键shardingKey - 分库分表因子clazz - 数据对象classprivate ShardingDBResource _getDbFromMaster(String tableName, IShardingKey<?> shardingKey)
clazz - 数据对象shardingKey - 路由因子Copyright © 2015. All rights reserved.