public interface IShardingUpdate extends IDataUpdate
| Modifier and Type | Method and Description |
|---|---|
void |
removeByPk(EntityPK pk,
IShardingKey<?> shardingValue,
Class<?> clazz)
根据主键删除数据.
|
void |
removeByPks(List<EntityPK> pks,
IShardingKey<?> shardingValue,
Class<?> clazz)
根据主键批量删除数据.
|
PKValue |
save(Object entity,
IShardingKey<?> shardingValue)
保存数据.
|
PKValue[] |
saveBatch(List<? extends Object> entities,
IShardingKey<?> shardingValue,
boolean autoGeneratedKeys)
批量保存数据.
|
void |
update(Object entity,
IShardingKey<?> shardingValue)
更新数据.
|
void |
updateBatch(List<? extends Object> entities,
IShardingKey<?> shardingValue)
单数据库多数据批量更新.
|
getDBCluster, getPrimaryCache, getSecondCache, getTransactionManager, setDBCluster, setPrimaryCache, setSecondCache, setTransactionManagerPKValue save(Object entity, IShardingKey<?> shardingValue)
entity - 数据对象shardingValue - 分库分表因子DBOperationException - 操作失败PKValue[] saveBatch(List<? extends Object> entities, IShardingKey<?> shardingValue, boolean autoGeneratedKeys)
entities - 批量数据对象shardingValue - 分库分表因子DBOperationException - 操作失败void update(Object entity, IShardingKey<?> shardingValue)
entity - 数据对象shardingValue - 分库分表因子DBOperationException - 操作失败void updateBatch(List<? extends Object> entities, IShardingKey<?> shardingValue)
entities - 批量更新数据shardingValue - 分库分表因子DBOperationException - 操作失败void removeByPk(EntityPK pk, IShardingKey<?> shardingValue, Class<?> clazz)
pk - 主键shardingValue - 分库分表因子clazz - 数据对象classDBOperationException - 操作失败void removeByPks(List<EntityPK> pks, IShardingKey<?> shardingValue, Class<?> clazz)
pks - 主键shardingValue - 分库分表因子clazz - 数据对象classDBOperationException - 操作失败Copyright © 2015. All rights reserved.