- java.lang.Object
-
- org.redkale.service.AbstractService
-
- org.redkale.source.AbstractDataSource
-
- org.redkale.source.DataMemorySource
-
- 所有已实现的接口:
AutoCloseable
,Resourcable
,Service
,DataSource
@Local @AutoLoad(false) @ResourceType(DataSource.class) public class DataMemorySource extends AbstractDataSource
DataSource的Memory实现类
注意: url 需要指定为 memory:datasource详情见: https://redkale.org
- 作者:
- zhangjx
-
-
嵌套类概要
-
从类继承的嵌套类/接口 org.redkale.source.AbstractDataSource
AbstractDataSource.BatchAction, AbstractDataSource.DefaultDataBatch, AbstractDataSource.DeleteBatchAction1, AbstractDataSource.DeleteBatchAction2, AbstractDataSource.DeleteBatchAction3, AbstractDataSource.InsertBatchAction1, AbstractDataSource.RunnableBatchAction, AbstractDataSource.SourceUrlInfo, AbstractDataSource.UpdateBatchAction1, AbstractDataSource.UpdateBatchAction2, AbstractDataSource.UpdateBatchAction3, AbstractDataSource.UpdateBatchAction4
-
-
字段概要
-
从类继承的字段 org.redkale.source.AbstractDataSource
name, serialArrayFunc, sourceThreads
-
-
构造器概要
构造器 构造器 说明 DataMemorySource(String name)
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 static boolean
acceptsConf(AnyValue config)
<T> int
clearTable(Class<T> clazz, FilterNode node)
清空表
等价SQL: TRUNCATE TABLE {table}<T> CompletableFuture<Integer>
clearTableAsync(Class<T> clazz, FilterNode node)
清空表
等价SQL: TRUNCATE TABLE {table}void
close()
<T> void
compile(Class<T> clazz)
提取预编译Entity类,主要用于native-image使用<T> int
createTable(Class<T> clazz, Serializable pk)
删除表
等价SQL: DROP TABLE {table}<T> CompletableFuture<Integer>
createTableAsync(Class<T> clazz, Serializable pk)
删除表
等价SQL: DROP TABLE {table}<T> int
delete(Class<T> clazz, Serializable... pks)
删除指定主键值的记录,多主键值必须在同一张表中
等价SQL: DELETE FROM {table} WHERE {primary} IN {ids}<T> int
delete(Class<T> clazz, Flipper flipper, FilterNode node)
删除符合过滤条件且指定最大影响条数的记录
Flipper中offset字段将被忽略
等价SQL: DELETE FROM {table} WHERE {filter node} ORDER BY {flipper.sort} LIMIT {flipper.limit}<T> int
delete(T... entitys)
删除指定主键值的记录, 多对象必须是同一个Entity类且必须在同一张表中
等价SQL: DELETE FROM {table} WHERE {primary} IN {getValues.id}<T> CompletableFuture<Integer>
deleteAsync(Class<T> clazz, Serializable... pks)
删除指定主键值的记录,多主键值必须在同一张表中
等价SQL: DELETE FROM {table} WHERE {primary} IN {ids}<T> CompletableFuture<Integer>
deleteAsync(Class<T> clazz, Flipper flipper, FilterNode node)
删除符合过滤条件且指定最大影响条数的记录
Flipper中offset字段将被忽略
等价SQL: DELETE FROM {table} WHERE {filter node} ORDER BY {flipper.sort} LIMIT {flipper.limit}<T> CompletableFuture<Integer>
deleteAsync(T... entitys)
删除指定主键值的记录, 多对象必须是同一个Entity类且必须在同一张表中
等价SQL: DELETE FROM {table} WHERE {primary} IN {getValues.id}<T> int
dropTable(Class<T> clazz, FilterNode node)
删除表
等价SQL: DROP TABLE {table}<T> CompletableFuture<Integer>
dropTableAsync(Class<T> clazz, FilterNode node)
删除表
等价SQL: DROP TABLE {table}<T> boolean
exists(Class<T> clazz, Serializable pk)
判断是否存在主键值的记录
等价SQL: SELECT COUNT(*) FROM {table} WHERE {primary} = {id}<T> boolean
exists(Class<T> clazz, FilterNode node)
判断是否存在符合过滤条件的记录
等价SQL: SELECT COUNT(*) FROM {table} WHERE {filter node}<T> CompletableFuture<Boolean>
existsAsync(Class<T> clazz, Serializable pk)
判断是否存在主键值的记录
等价SQL: SELECT COUNT(*) FROM {table} WHERE {primary} = {id}<T> CompletableFuture<Boolean>
existsAsync(Class<T> clazz, FilterNode node)
判断是否存在符合过滤条件的记录
等价SQL: SELECT COUNT(*) FROM {table} WHERE {filter node}<T> T
find(Class<T> clazz, SelectColumn selects, Serializable pk)
获取指定主键值的单个记录, 返回null表示不存在值
等价SQL: SELECT {column1},{column2}, ··· FROM {table} WHERE {primary} = {id}<T> T
find(Class<T> clazz, SelectColumn selects, FilterNode node)
获取符合过滤条件单个记录, 返回null表示不存在值
等价SQL: SELECT {column1},{column2}, ··· FROM {table} WHERE {filter node}<T> CompletableFuture<T>
findAsync(Class<T> clazz, SelectColumn selects, Serializable pk)
获取指定主键值的单个记录, 返回null表示不存在值
等价SQL: SELECT {column1},{column2}, ··· FROM {table} WHERE {primary} = {id}<T> CompletableFuture<T>
findAsync(Class<T> clazz, SelectColumn selects, FilterNode node)
获取符合过滤条件单个记录, 返回null表示不存在值
等价SQL: SELECT {column1},{column2}, ··· FROM {table} WHERE {filter node}<T> Serializable
findColumn(Class<T> clazz, String column, Serializable defValue, Serializable pk)
获取符合过滤条件单个记录的单个字段值, 不存在值则返回默认值
等价SQL: SELECT {column} FROM {table} WHERE {primary} = {id}<T> Serializable
findColumn(Class<T> clazz, String column, Serializable defValue, FilterNode node)
获取符合过滤条件单个记录的单个字段值, 不存在值则返回默认值
等价SQL: SELECT {column} FROM {table} WHERE {filter node}<T> CompletableFuture<Serializable>
findColumnAsync(Class<T> clazz, String column, Serializable defValue, Serializable pk)
获取符合过滤条件单个记录的单个字段值, 不存在值则返回默认值
等价SQL: SELECT {column} FROM {table} WHERE {primary} = {id}<T> CompletableFuture<Serializable>
findColumnAsync(Class<T> clazz, String column, Serializable defValue, FilterNode node)
获取符合过滤条件单个记录的单个字段值, 不存在值则返回默认值
等价SQL: SELECT {column} FROM {table} WHERE {filter node}<T> T[]
finds(Class<T> clazz, SelectColumn selects, Serializable... pks)
获取指定主键值的多个记录, 返回数组,数组长度与pks一样
等价SQL: SELECT {column1},{column2}, ··· FROM {table} WHERE {primary} = {id1,id2, ···}<T> CompletableFuture<T[]>
findsAsync(Class<T> clazz, SelectColumn selects, Serializable... pks)
获取指定主键值的多个记录, 返回数组,数组长度与pks一样
等价SQL: SELECT {column1},{column2}, ··· FROM {table} WHERE {primary} = {id1,id2, ···}<D extends Serializable,T>
List<T>findsList(Class<T> clazz, Stream<D> pks)
获取指定主键值的多个记录, 返回列表
等价SQL: SELECT {column1},{column2}, ··· FROM {table} WHERE {primary} = {id1,id2, ···}<D extends Serializable,T>
CompletableFuture<List<T>>findsListAsync(Class<T> clazz, Stream<D> pks)
获取指定主键值的多个记录, 返回列表
等价SQL: SELECT {column1},{column2}, ··· FROM {table} WHERE {primary} = {id1,id2, ···}<N extends Number>
Map<String,N>getNumberMap(Class entityClass, FilterNode node, FilterFuncColumn... columns)
获取符合过滤条件记录的聚合结果Map
等价SQL: SELECT FUNC1{column1}, FUNC2{column2}, ··· FROM {table} WHERE {filter node}
如 getNumberMapAsync(User.class, (FilterNode)null, new FilterFuncColumn(FilterFunc.MAX, "createtime")) 等价于: SELECT MAX(createtime) FROM {table}<N extends Number>
CompletableFuture<Map<String,N>>getNumberMapAsync(Class entityClass, FilterNode node, FilterFuncColumn... columns)
获取符合过滤条件记录的聚合结果Map
等价SQL: SELECT FUNC1{column1}, FUNC2{column2}, ··· FROM {table} WHERE {filter node}
如 getNumberMapAsync(User.class, (FilterNode)null, new FilterFuncColumn(FilterFunc.MAX, "createtime")) 等价于: SELECT MAX(createtime) FROM {table}Number
getNumberResult(Class entityClass, FilterFunc func, Number defVal, String column, FilterNode node)
获取符合过滤条件记录的聚合结果, 无结果返回默认值
等价SQL: SELECT FUNC{column} FROM {table} WHERE {filter node}
如 getNumberResultAsync(User.class, FilterFunc.MAX, "createtime", (FilterNode)null) 等价于: SELECT MAX(createtime) FROM {table}CompletableFuture<Number>
getNumberResultAsync(Class entityClass, FilterFunc func, Number defVal, String column, FilterNode node)
获取符合过滤条件记录的聚合结果, 无结果返回默认值
等价SQL: SELECT FUNC{column} FROM {table} WHERE {filter node}
如 getNumberResultAsync(User.class, FilterFunc.MAX, "createtime", (FilterNode)null) 等价于: SELECT MAX(createtime) FROM {table}String
getType()
获取数据源类型<T> int
insert(T... entitys)
新增记录, 多对象必须是同一个Entity类且必须在同一张表中<T> CompletableFuture<Integer>
insertAsync(T... entitys)
新增记录, 多对象必须是同一个Entity类且必须在同一张表中protected boolean
isOnlyCache(EntityInfo info)
是否虚拟化的持久对象void
onResourceChange(ResourceEvent[] events)
<T,V extends Serializable>
List<V>queryColumnList(String selectedColumn, Class<T> clazz, Flipper flipper, FilterNode node)
查询符合过滤条件记录的某个字段List集合
等价SQL: SELECT {selectedColumn} FROM {table} WHERE {filter node} ORDER BY {flipper.sort} LIMIT {flipper.limit}<T,V extends Serializable>
CompletableFuture<List<V>>queryColumnListAsync(String selectedColumn, Class<T> clazz, Flipper flipper, FilterNode node)
查询符合过滤条件记录的某个字段List集合
等价SQL: SELECT {selectedColumn} FROM {table} WHERE {filter node} ORDER BY {flipper.sort} LIMIT {flipper.limit}<T,K extends Serializable,N extends Number>
Map<K,N>queryColumnMap(Class<T> entityClass, String keyColumn, FilterFunc func, String funcColumn, FilterNode node)
查询符合过滤条件记录的GROUP BY聚合结果Map
等价SQL: SELECT keyColumn, FUNC{funcColumn} FROM {table} WHERE {filter node} GROUP BY {keyColumn}
如 queryColumnMapAsync(User.class, "name", FilterFunc.MAX, "createtime", (FilterNode)null) 等价于: SELECT name, MAX(createtime) FROM user GROUP BY name<T,K extends Serializable,N extends Number>
Map<K[],N[]>queryColumnMap(Class<T> entityClass, ColumnNode[] funcNodes, String[] groupByColumns, FilterNode node)
查询符合过滤条件记录的GROUP BY聚合结果Map
等价SQL: SELECT col1, col2, FUNC{funcColumn1}, FUNC{funcColumn2} FROM {table} WHERE {filter node} GROUP BY {col1}, {col2}
如 queryColumnMapAsync(OrderRecord.class, Utility.ofArray(ColumnExpNode.div(ColumnFuncNode.sum("money"), 100), ColumnFuncNode.avg(ColumnExpNode.dec("money", 20)))), Utility.ofArray("fromid", "targetid"), (FilterNode)null) 等价于: SELECT fromid, targetid, SUM(money) / 100, AVG(money - 20) FROM orderrecord GROUP BY fromid, targetid<T,K extends Serializable,N extends Number>
Map<K,N[]>queryColumnMap(Class<T> entityClass, ColumnNode[] funcNodes, String groupByColumn, FilterNode node)
查询符合过滤条件记录的GROUP BY聚合结果Map
等价SQL: SELECT col1, FUNC{funcColumn1}, FUNC{funcColumn2} FROM {table} WHERE {filter node} GROUP BY {col1}
如 queryColumnMapAsync(OrderRecord.class, Utility.ofArray(ColumnExpNode.div(ColumnFuncNode.sum("money"), 100), ColumnFuncNode.avg(ColumnExpNode.dec("money", 20)))), "targetid", (FilterNode)null) 等价于: SELECT targetid, SUM(money) / 100, AVG(money - 20) FROM orderrecord GROUP BY targetid<T,K extends Serializable,N extends Number>
CompletableFuture<Map<K,N>>queryColumnMapAsync(Class<T> entityClass, String keyColumn, FilterFunc func, String funcColumn, FilterNode node)
查询符合过滤条件记录的GROUP BY聚合结果Map
等价SQL: SELECT keyColumn, FUNC{funcColumn} FROM {table} WHERE {filter node} GROUP BY {keyColumn}
如 queryColumnMapAsync(User.class, "name", FilterFunc.MAX, "createtime", (FilterNode)null) 等价于: SELECT name, MAX(createtime) FROM user GROUP BY name<T,K extends Serializable,N extends Number>
CompletableFuture<Map<K[],N[]>>queryColumnMapAsync(Class<T> entityClass, ColumnNode[] funcNodes, String[] groupByColumns, FilterNode node)
查询符合过滤条件记录的GROUP BY聚合结果Map
等价SQL: SELECT col1, col2, FUNC{funcColumn1}, FUNC{funcColumn2} FROM {table} WHERE {filter node} GROUP BY {col1}, {col2}
如 queryColumnMapAsync(OrderRecord.class, Utility.ofArray(ColumnExpNode.div(ColumnFuncNode.sum("money"), 100), ColumnFuncNode.avg(ColumnExpNode.dec("money", 20)))), Utility.ofArray("fromid", "targetid"), (FilterNode)null) 等价于: SELECT fromid, targetid, SUM(money) / 100, AVG(money - 20) FROM orderrecord GROUP BY fromid, targetid<T,K extends Serializable,N extends Number>
CompletableFuture<Map<K,N[]>>queryColumnMapAsync(Class<T> entityClass, ColumnNode[] funcNodes, String groupByColumn, FilterNode node)
查询符合过滤条件记录的GROUP BY聚合结果Map
等价SQL: SELECT col1, FUNC{funcColumn1}, FUNC{funcColumn2} FROM {table} WHERE {filter node} GROUP BY {col1}
如 queryColumnMapAsync(OrderRecord.class, Utility.ofArray(ColumnExpNode.div(ColumnFuncNode.sum("money"), 100), ColumnFuncNode.avg(ColumnExpNode.dec("money", 20)))), "targetid", (FilterNode)null) 等价于: SELECT targetid, SUM(money) / 100, AVG(money - 20) FROM orderrecord GROUP BY targetid<T,V extends Serializable>
Set<V>queryColumnSet(String selectedColumn, Class<T> clazz, Flipper flipper, FilterNode node)
查询符合过滤条件记录的某个字段Set集合
等价SQL: SELECT DISTINCT {selectedColumn} FROM {table} WHERE {filter node} ORDER BY {flipper.sort} LIMIT {flipper.limit}<T,V extends Serializable>
CompletableFuture<Set<V>>queryColumnSetAsync(String selectedColumn, Class<T> clazz, Flipper flipper, FilterNode node)
查询符合过滤条件记录的某个字段Set集合
等价SQL: SELECT DISTINCT {selectedColumn} FROM {table} WHERE {filter node} ORDER BY {flipper.sort} LIMIT {flipper.limit}<T,V extends Serializable>
Sheet<V>queryColumnSheet(String selectedColumn, Class<T> clazz, Flipper flipper, FilterNode node)
查询符合过滤条件记录的某个字段Sheet集合
等价SQL: SELECT {selectedColumn} FROM {table} WHERE {filter bean} ORDER BY {flipper.sort} LIMIT {flipper.limit}<T,V extends Serializable>
CompletableFuture<Sheet<V>>queryColumnSheetAsync(String selectedColumn, Class<T> clazz, Flipper flipper, FilterNode node)
查询符合过滤条件记录的某个字段Sheet集合
等价SQL: SELECT {selectedColumn} FROM {table} WHERE {filter bean} ORDER BY {flipper.sort} LIMIT {flipper.limit}<T> List<T>
queryList(Class<T> clazz, SelectColumn selects, Flipper flipper, FilterNode node)
查询符合过滤条件记录的List集合
等价SQL: SELECT {column1},{column2}, ··· FROM {table} WHERE {filter node} ORDER BY {flipper.sort} LIMIT {flipper.limit}<T> CompletableFuture<List<T>>
queryListAsync(Class<T> clazz, SelectColumn selects, Flipper flipper, FilterNode node)
查询符合过滤条件记录的List集合
等价SQL: SELECT {column1},{column2}, ··· FROM {table} WHERE {filter node} ORDER BY {flipper.sort} LIMIT {flipper.limit}<K extends Serializable,T>
Map<K,T>queryMap(Class<T> clazz, SelectColumn selects, Stream<K> keyStream)
查询符合过滤条件记录的List转Map集合, key=主键值, value=Entity对象
等价SQL: SELECT * FROM {table} WHERE id IN {ids}<K extends Serializable,T>
Map<K,T>queryMap(Class<T> clazz, SelectColumn selects, FilterNode node)
查询符合过滤条件记录的List转Map集合, key=主键值, value=Entity对象
等价SQL: SELECT * FROM {table} WHERE {filter node}<K extends Serializable,T>
CompletableFuture<Map<K,T>>queryMapAsync(Class<T> clazz, SelectColumn selects, Stream<K> keyStream)
查询符合过滤条件记录的List转Map集合, key=主键值, value=Entity对象
等价SQL: SELECT * FROM {table} WHERE id IN {ids}<K extends Serializable,T>
CompletableFuture<Map<K,T>>queryMapAsync(Class<T> clazz, SelectColumn selects, FilterNode node)
查询符合过滤条件记录的List转Map集合, key=主键值, value=Entity对象
等价SQL: SELECT * FROM {table} WHERE {filter node}<T> Set<T>
querySet(Class<T> clazz, SelectColumn selects, Flipper flipper, FilterNode node)
查询符合过滤条件记录的Set集合
等价SQL: SELECT DISTINCT {column1},{column2}, ··· FROM {table} WHERE {filter node} ORDER BY {flipper.sort} LIMIT {flipper.limit}<T> CompletableFuture<Set<T>>
querySetAsync(Class<T> clazz, SelectColumn selects, Flipper flipper, FilterNode node)
查询符合过滤条件记录的Set集合
等价SQL: SELECT DISTINCT {column1},{column2}, ··· FROM {table} WHERE {filter node} ORDER BY {flipper.sort} LIMIT {flipper.limit}<T> Sheet<T>
querySheet(Class<T> clazz, SelectColumn selects, Flipper flipper, FilterNode node)
查询符合过滤条件记录的Sheet集合
等价SQL: SELECT {column1},{column2}, ··· FROM {table} WHERE {filter node} ORDER BY {flipper.sort} LIMIT {flipper.limit}<T> CompletableFuture<Sheet<T>>
querySheetAsync(Class<T> clazz, SelectColumn selects, Flipper flipper, FilterNode node)
查询符合过滤条件记录的Sheet集合
等价SQL: SELECT {column1},{column2}, ··· FROM {table} WHERE {filter node} ORDER BY {flipper.sort} LIMIT {flipper.limit}String
toString()
<T> int
update(T... entitys)
更新记录, 多对象必须是同一个Entity类且必须在同一张表中
等价SQL:
UPDATE {table} SET column1 = value1, column2 = value2, ··· WHERE {primary} = {id1}
UPDATE {table} SET column1 = value1, column2 = value2, ··· WHERE {primary} = {id2}
···<T> CompletableFuture<Integer>
updateAsync(T... entitys)
更新记录, 多对象必须是同一个Entity类且必须在同一张表中
等价SQL:
UPDATE {table} SET column1 = value1, column2 = value2, ··· WHERE {primary} = {id1}
UPDATE {table} SET column1 = value1, column2 = value2, ··· WHERE {primary} = {id2}
···<T> int
updateColumn(Class<T> clazz, Serializable pk, String column, Serializable value)
更新单个记录的单个字段
注意:即使字段标记为@Column(updatable=false)也会被更新
等价SQL: UPDATE {table} SET {column} = {value} WHERE {primary} = {id}<T> int
updateColumn(Class<T> clazz, Serializable pk, ColumnValue... values)
更新指定主键值记录的部分字段
字段赋值操作选项见 ColumnExpress
等价SQL: UPDATE {table} SET {column1} = {value1}, {column2} += {value2}, {column3} *= {value3}, ··· WHERE {filter node}<T> int
updateColumn(Class<T> clazz, String column, Serializable value, FilterNode node)
更新符合过滤条件记录的单个字段
注意:即使字段标记为@Column(updatable=false)也会被更新
等价SQL: UPDATE {table} SET {column} = {value} WHERE {filter node}<T> int
updateColumn(Class<T> clazz, FilterNode node, Flipper flipper, ColumnValue... values)
更新符合过滤条件的记录的指定字段
Flipper中offset字段将被忽略
注意:Entity类中标记为@Column(updatable=false)不会被更新
等价SQL: UPDATE {table} SET {column1} = {value1}, {column2} += {value2}, {column3} *= {value3}, ··· WHERE {filter node} ORDER BY {flipper.sort}<T> int
updateColumn(T entity, FilterNode node, SelectColumn selects)
更新符合过滤条件记录的指定字段
注意:Entity类中标记为@Column(updatable=false)不会被更新
等价SQL: UPDATE {table} SET {column1} = {value1}, {column2} = {value2}, {column3} = {value3}, ··· WHERE {filter node}<T> CompletableFuture<Integer>
updateColumnAsync(Class<T> clazz, Serializable pk, String column, Serializable value)
更新单个记录的单个字段
注意:即使字段标记为@Column(updatable=false)也会被更新
等价SQL: UPDATE {table} SET {column} = {value} WHERE {primary} = {id}<T> CompletableFuture<Integer>
updateColumnAsync(Class<T> clazz, Serializable pk, ColumnValue... values)
更新指定主键值记录的部分字段
字段赋值操作选项见 ColumnExpress
等价SQL: UPDATE {table} SET {column1} = {value1}, {column2} += {value2}, {column3} *= {value3}, ··· WHERE {filter node}<T> CompletableFuture<Integer>
updateColumnAsync(Class<T> clazz, String column, Serializable value, FilterNode node)
更新符合过滤条件记录的单个字段
注意:即使字段标记为@Column(updatable=false)也会被更新
等价SQL: UPDATE {table} SET {column} = {value} WHERE {filter node}<T> CompletableFuture<Integer>
updateColumnAsync(Class<T> clazz, FilterNode node, Flipper flipper, ColumnValue... values)
更新符合过滤条件的记录的指定字段
Flipper中offset字段将被忽略
注意:Entity类中标记为@Column(updatable=false)不会被更新
等价SQL: UPDATE {table} SET {column1} = {value1}, {column2} += {value2}, {column3} *= {value3}, ··· WHERE {filter node} ORDER BY {flipper.sort}<T> CompletableFuture<Integer>
updateColumnAsync(T entity, FilterNode node, SelectColumn selects)
更新符合过滤条件记录的指定字段
注意:Entity类中标记为@Column(updatable=false)不会被更新
等价SQL: UPDATE {table} SET {column1} = {value1}, {column2} = {value2}, {column3} = {value3}, ··· WHERE {filter node}-
从类继承的方法 org.redkale.source.AbstractDataSource
batch, batchAsync, checkEntity, clearTableAsync, complete, completeExceptionally, createPredicate, dropTable, dropTableAsync, executorToString, exists, existsAsync, find, find, find, find, find, findAsync, findAsync, findAsync, findAsync, findAsync, findColumn, findColumn, findColumn, findColumn, findColumnAsync, findColumnAsync, findColumnAsync, findColumnAsync, getEntityInfo, getEntityValue, getExecutor, getJoinTabalis, getNumberMap, getNumberMap, getNumberMapAsync, getNumberMapAsync, getNumberResult, getNumberResult, getNumberResult, getNumberResult, getNumberResult, getNumberResultAsync, getNumberResultAsync, getNumberResultAsync, getNumberResultAsync, getNumberResultAsync, init, insert, insert, insertAsync, insertAsync, isCacheUseable, loadEntityInfo, parseSourceUrl, queryColumnList, queryColumnList, queryColumnList, queryColumnList, queryColumnListAsync, queryColumnListAsync, queryColumnListAsync, queryColumnListAsync, queryColumnMap, queryColumnMap, queryColumnMap, queryColumnMap, queryColumnMap, queryColumnMap, queryColumnMapAsync, queryColumnMapAsync, queryColumnMapAsync, queryColumnMapAsync, queryColumnMapAsync, queryColumnMapAsync, queryColumnSet, queryColumnSet, queryColumnSet, queryColumnSet, queryColumnSetAsync, queryColumnSetAsync, queryColumnSetAsync, queryColumnSetAsync, queryColumnSheet, queryColumnSheetAsync, queryList, queryList, queryList, queryList, queryList, queryList, queryList, queryList, queryList, queryList, queryListAsync, queryListAsync, queryListAsync, queryListAsync, queryListAsync, queryListAsync, queryListAsync, queryListAsync, queryListAsync, queryListAsync, queryMap, queryMap, queryMap, queryMap, queryMapAsync, queryMapAsync, queryMapAsync, queryMapAsync, querySet, querySet, querySet, querySet, querySet, querySet, querySet, querySet, querySet, querySet, querySetAsync, querySetAsync, querySetAsync, querySetAsync, querySetAsync, querySetAsync, querySetAsync, querySetAsync, querySetAsync, querySetAsync, querySheet, querySheet, querySheet, querySheetAsync, querySheetAsync, querySheetAsync, resourceName, setSourceExecutor, supplyAsync, updateColumn, updateColumn, updateColumn, updateColumnAsync, updateColumnAsync, updateColumnAsync
-
从类继承的方法 org.redkale.service.AbstractService
runAsync, serviceName, serviceType
-
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
从接口继承的方法 org.redkale.source.DataSource
clearTable, delete, delete, delete, deleteAsync, deleteAsync, deleteAsync, find, findAsync, finds, finds, finds, findsAsync, findsAsync, findsAsync, queryColumnSheet, queryColumnSheetAsync, queryList, queryList, queryListAsync, queryListAsync, querySheet, querySheet, querySheetAsync, querySheetAsync, update, update, updateAsync, updateAsync, updateColumn, updateColumn, updateColumn, updateColumn, updateColumn, updateColumn, updateColumn, updateColumn, updateColumn, updateColumnAsync, updateColumnAsync, updateColumnAsync, updateColumnAsync, updateColumnAsync, updateColumnAsync, updateColumnAsync, updateColumnAsync, updateColumnAsync
-
-
-
-
构造器详细资料
-
DataMemorySource
public DataMemorySource(String name)
-
-
方法详细资料
-
getType
@Local public String getType()
从接口复制的说明:DataSource
获取数据源类型- 返回:
- String
-
onResourceChange
@ResourceChanged public void onResourceChange(ResourceEvent[] events)
- 指定者:
onResourceChange
在类中AbstractDataSource
-
acceptsConf
public static boolean acceptsConf(AnyValue config)
-
compile
@Local public <T> void compile(Class<T> clazz)
从接口复制的说明:DataSource
提取预编译Entity类,主要用于native-image使用- 类型参数:
T
- 泛型- 参数:
clazz
- Entity实体类
-
isOnlyCache
protected final boolean isOnlyCache(EntityInfo info)
从类复制的说明:AbstractDataSource
是否虚拟化的持久对象- 覆盖:
isOnlyCache
在类中AbstractDataSource
- 参数:
info
- EntityInfo- 返回:
- boolean
-
insert
public <T> int insert(T... entitys)
从接口复制的说明:DataSource
新增记录, 多对象必须是同一个Entity类且必须在同一张表中- 类型参数:
T
- 泛型- 参数:
entitys
- Entity对象- 返回:
- 影响的记录条数
-
insertAsync
public <T> CompletableFuture<Integer> insertAsync(T... entitys)
从接口复制的说明:DataSource
新增记录, 多对象必须是同一个Entity类且必须在同一张表中- 类型参数:
T
- 泛型- 参数:
entitys
- Entity对象- 返回:
- CompletableFuture
-
delete
public <T> int delete(T... entitys)
从接口复制的说明:DataSource
删除指定主键值的记录, 多对象必须是同一个Entity类且必须在同一张表中
等价SQL: DELETE FROM {table} WHERE {primary} IN {getValues.id}- 类型参数:
T
- 泛型- 参数:
entitys
- Entity对象- 返回:
- 影响的记录条数
-
deleteAsync
public <T> CompletableFuture<Integer> deleteAsync(T... entitys)
从接口复制的说明:DataSource
删除指定主键值的记录, 多对象必须是同一个Entity类且必须在同一张表中
等价SQL: DELETE FROM {table} WHERE {primary} IN {getValues.id}- 类型参数:
T
- 泛型- 参数:
entitys
- Entity对象- 返回:
- 影响的记录条数CompletableFuture
-
delete
public <T> int delete(Class<T> clazz, Serializable... pks)
从接口复制的说明:DataSource
删除指定主键值的记录,多主键值必须在同一张表中
等价SQL: DELETE FROM {table} WHERE {primary} IN {ids}- 类型参数:
T
- Entity泛型- 参数:
clazz
- Entity类pks
- 主键值- 返回:
- 影响的记录条数
-
deleteAsync
public <T> CompletableFuture<Integer> deleteAsync(Class<T> clazz, Serializable... pks)
从接口复制的说明:DataSource
删除指定主键值的记录,多主键值必须在同一张表中
等价SQL: DELETE FROM {table} WHERE {primary} IN {ids}- 类型参数:
T
- Entity泛型- 参数:
clazz
- Entity类pks
- 主键值- 返回:
- 影响的记录条数CompletableFuture
-
delete
public <T> int delete(Class<T> clazz, Flipper flipper, FilterNode node)
从接口复制的说明:DataSource
删除符合过滤条件且指定最大影响条数的记录
Flipper中offset字段将被忽略
等价SQL: DELETE FROM {table} WHERE {filter node} ORDER BY {flipper.sort} LIMIT {flipper.limit}- 类型参数:
T
- Entity泛型- 参数:
clazz
- Entity类flipper
- 翻页对象node
- 过滤条件- 返回:
- 影响的记录条数
-
deleteAsync
public <T> CompletableFuture<Integer> deleteAsync(Class<T> clazz, Flipper flipper, FilterNode node)
从接口复制的说明:DataSource
删除符合过滤条件且指定最大影响条数的记录
Flipper中offset字段将被忽略
等价SQL: DELETE FROM {table} WHERE {filter node} ORDER BY {flipper.sort} LIMIT {flipper.limit}- 类型参数:
T
- Entity泛型- 参数:
clazz
- Entity类flipper
- 翻页对象node
- 过滤条件- 返回:
- 影响的记录条数CompletableFuture
-
clearTable
public <T> int clearTable(Class<T> clazz, FilterNode node)
从接口复制的说明:DataSource
清空表
等价SQL: TRUNCATE TABLE {table}- 类型参数:
T
- Entity泛型- 参数:
clazz
- Entity类node
- 分库分表的过滤条件- 返回:
- 影响的记录条数 -1表示表不存在
-
clearTableAsync
public <T> CompletableFuture<Integer> clearTableAsync(Class<T> clazz, FilterNode node)
从接口复制的说明:DataSource
清空表
等价SQL: TRUNCATE TABLE {table}- 类型参数:
T
- Entity泛型- 参数:
clazz
- Entity类node
- 分库分表的过滤条件- 返回:
- 影响的记录条数CompletableFuture -1表示表不存在
-
createTable
public <T> int createTable(Class<T> clazz, Serializable pk)
从接口复制的说明:DataSource
删除表
等价SQL: DROP TABLE {table}- 类型参数:
T
- Entity泛型- 参数:
clazz
- Entity类pk
- 主键- 返回:
- 建表结果
-
createTableAsync
public <T> CompletableFuture<Integer> createTableAsync(Class<T> clazz, Serializable pk)
从接口复制的说明:DataSource
删除表
等价SQL: DROP TABLE {table}- 类型参数:
T
- Entity泛型- 参数:
clazz
- Entity类pk
- 主键- 返回:
- 建表结果
-
dropTable
public <T> int dropTable(Class<T> clazz, FilterNode node)
从接口复制的说明:DataSource
删除表
等价SQL: DROP TABLE {table}- 类型参数:
T
- Entity泛型- 参数:
clazz
- Entity类node
- 过滤条件- 返回:
- 影响的记录条数 -1表示表不存在
-
dropTableAsync
public <T> CompletableFuture<Integer> dropTableAsync(Class<T> clazz, FilterNode node)
从接口复制的说明:DataSource
删除表
等价SQL: DROP TABLE {table}- 类型参数:
T
- Entity泛型- 参数:
clazz
- Entity类node
- 分库分表的过滤条件- 返回:
- 影响的记录条数CompletableFuture -1表示表不存在
-
update
public <T> int update(T... entitys)
从接口复制的说明:DataSource
更新记录, 多对象必须是同一个Entity类且必须在同一张表中
等价SQL:
UPDATE {table} SET column1 = value1, column2 = value2, ··· WHERE {primary} = {id1}
UPDATE {table} SET column1 = value1, column2 = value2, ··· WHERE {primary} = {id2}
···- 类型参数:
T
- 泛型- 参数:
entitys
- Entity对象- 返回:
- 影响的记录条数
-
updateAsync
public <T> CompletableFuture<Integer> updateAsync(T... entitys)
从接口复制的说明:DataSource
更新记录, 多对象必须是同一个Entity类且必须在同一张表中
等价SQL:
UPDATE {table} SET column1 = value1, column2 = value2, ··· WHERE {primary} = {id1}
UPDATE {table} SET column1 = value1, column2 = value2, ··· WHERE {primary} = {id2}
···- 类型参数:
T
- 泛型- 参数:
entitys
- Entity对象- 返回:
- 影响的记录条数CompletableFuture
-
updateColumn
public <T> int updateColumn(Class<T> clazz, Serializable pk, String column, Serializable value)
从接口复制的说明:DataSource
更新单个记录的单个字段
注意:即使字段标记为@Column(updatable=false)也会被更新
等价SQL: UPDATE {table} SET {column} = {value} WHERE {primary} = {id}- 类型参数:
T
- Entity泛型- 参数:
clazz
- Entity类pk
- 主键column
- 待更新的字段名value
- 更新值- 返回:
- 影响的记录条数
-
updateColumnAsync
public <T> CompletableFuture<Integer> updateColumnAsync(Class<T> clazz, Serializable pk, String column, Serializable value)
从接口复制的说明:DataSource
更新单个记录的单个字段
注意:即使字段标记为@Column(updatable=false)也会被更新
等价SQL: UPDATE {table} SET {column} = {value} WHERE {primary} = {id}- 类型参数:
T
- Entity泛型- 参数:
clazz
- Entity类pk
- 主键column
- 待更新的字段名value
- 更新值- 返回:
- 影响的记录条数CompletableFuture
-
updateColumn
public <T> int updateColumn(Class<T> clazz, String column, Serializable value, FilterNode node)
从接口复制的说明:DataSource
更新符合过滤条件记录的单个字段
注意:即使字段标记为@Column(updatable=false)也会被更新
等价SQL: UPDATE {table} SET {column} = {value} WHERE {filter node}- 类型参数:
T
- Entity泛型- 参数:
clazz
- Entity类column
- 待更新的字段名value
- 更新值node
- 过滤条件- 返回:
- 影响的记录条数
-
updateColumnAsync
public <T> CompletableFuture<Integer> updateColumnAsync(Class<T> clazz, String column, Serializable value, FilterNode node)
从接口复制的说明:DataSource
更新符合过滤条件记录的单个字段
注意:即使字段标记为@Column(updatable=false)也会被更新
等价SQL: UPDATE {table} SET {column} = {value} WHERE {filter node}- 类型参数:
T
- Entity泛型- 参数:
clazz
- Entity类column
- 待更新的字段名value
- 更新值node
- 过滤条件- 返回:
- 影响的记录条数CompletableFuture
-
updateColumn
public <T> int updateColumn(Class<T> clazz, Serializable pk, ColumnValue... values)
从接口复制的说明:DataSource
更新指定主键值记录的部分字段
字段赋值操作选项见 ColumnExpress
等价SQL: UPDATE {table} SET {column1} = {value1}, {column2} += {value2}, {column3} *= {value3}, ··· WHERE {filter node}- 类型参数:
T
- Entity泛型- 参数:
clazz
- Entity类pk
- 主键values
- 更新字段- 返回:
- 影响的记录条数
-
updateColumnAsync
public <T> CompletableFuture<Integer> updateColumnAsync(Class<T> clazz, Serializable pk, ColumnValue... values)
从接口复制的说明:DataSource
更新指定主键值记录的部分字段
字段赋值操作选项见 ColumnExpress
等价SQL: UPDATE {table} SET {column1} = {value1}, {column2} += {value2}, {column3} *= {value3}, ··· WHERE {filter node}- 类型参数:
T
- Entity泛型- 参数:
clazz
- Entity类pk
- 主键values
- 更新字段- 返回:
- 影响的记录条数CompletableFuture
-
updateColumn
public <T> int updateColumn(Class<T> clazz, FilterNode node, Flipper flipper, ColumnValue... values)
从接口复制的说明:DataSource
更新符合过滤条件的记录的指定字段
Flipper中offset字段将被忽略
注意:Entity类中标记为@Column(updatable=false)不会被更新
等价SQL: UPDATE {table} SET {column1} = {value1}, {column2} += {value2}, {column3} *= {value3}, ··· WHERE {filter node} ORDER BY {flipper.sort}- 类型参数:
T
- Entity泛型- 参数:
clazz
- Entity类node
- 过滤条件flipper
- 翻页对象values
- 更新字段- 返回:
- 影响的记录条数
-
updateColumnAsync
public <T> CompletableFuture<Integer> updateColumnAsync(Class<T> clazz, FilterNode node, Flipper flipper, ColumnValue... values)
从接口复制的说明:DataSource
更新符合过滤条件的记录的指定字段
Flipper中offset字段将被忽略
注意:Entity类中标记为@Column(updatable=false)不会被更新
等价SQL: UPDATE {table} SET {column1} = {value1}, {column2} += {value2}, {column3} *= {value3}, ··· WHERE {filter node} ORDER BY {flipper.sort}- 类型参数:
T
- Entity泛型- 参数:
clazz
- Entity类node
- 过滤条件flipper
- 翻页对象values
- 更新字段- 返回:
- 影响的记录条数CompletableFuture
-
updateColumn
public <T> int updateColumn(T entity, FilterNode node, SelectColumn selects)
从接口复制的说明:DataSource
更新符合过滤条件记录的指定字段
注意:Entity类中标记为@Column(updatable=false)不会被更新
等价SQL: UPDATE {table} SET {column1} = {value1}, {column2} = {value2}, {column3} = {value3}, ··· WHERE {filter node}- 类型参数:
T
- Entity泛型- 参数:
entity
- 待更新的Entity对象node
- 过滤条件selects
- 指定字段- 返回:
- 影响的记录条数
-
updateColumnAsync
public <T> CompletableFuture<Integer> updateColumnAsync(T entity, FilterNode node, SelectColumn selects)
从接口复制的说明:DataSource
更新符合过滤条件记录的指定字段
注意:Entity类中标记为@Column(updatable=false)不会被更新
等价SQL: UPDATE {table} SET {column1} = {value1}, {column2} = {value2}, {column3} = {value3}, ··· WHERE {filter node}- 类型参数:
T
- Entity泛型- 参数:
entity
- 待更新的Entity对象node
- 过滤条件selects
- 指定字段- 返回:
- 影响的记录条数CompletableFuture
-
getNumberResult
public Number getNumberResult(Class entityClass, FilterFunc func, Number defVal, String column, FilterNode node)
从接口复制的说明:DataSource
获取符合过滤条件记录的聚合结果, 无结果返回默认值
等价SQL: SELECT FUNC{column} FROM {table} WHERE {filter node}
如 getNumberResultAsync(User.class, FilterFunc.MAX, "createtime", (FilterNode)null) 等价于: SELECT MAX(createtime) FROM {table}- 参数:
entityClass
- Entity类func
- 聚合函数defVal
- 默认值column
- 指定字段node
- 过滤条件- 返回:
- 聚合结果
-
getNumberResultAsync
public CompletableFuture<Number> getNumberResultAsync(Class entityClass, FilterFunc func, Number defVal, String column, FilterNode node)
从接口复制的说明:DataSource
获取符合过滤条件记录的聚合结果, 无结果返回默认值
等价SQL: SELECT FUNC{column} FROM {table} WHERE {filter node}
如 getNumberResultAsync(User.class, FilterFunc.MAX, "createtime", (FilterNode)null) 等价于: SELECT MAX(createtime) FROM {table}- 参数:
entityClass
- Entity类func
- 聚合函数defVal
- 默认值column
- 指定字段node
- 过滤条件- 返回:
- 聚合结果CompletableFuture
-
getNumberMap
public <N extends Number> Map<String,N> getNumberMap(Class entityClass, FilterNode node, FilterFuncColumn... columns)
从接口复制的说明:DataSource
获取符合过滤条件记录的聚合结果Map
等价SQL: SELECT FUNC1{column1}, FUNC2{column2}, ··· FROM {table} WHERE {filter node}
如 getNumberMapAsync(User.class, (FilterNode)null, new FilterFuncColumn(FilterFunc.MAX, "createtime")) 等价于: SELECT MAX(createtime) FROM {table}- 类型参数:
N
- Number- 参数:
entityClass
- Entity类node
- 过滤条件columns
- 聚合字段- 返回:
- 聚合结果Map
-
getNumberMapAsync
public <N extends Number> CompletableFuture<Map<String,N>> getNumberMapAsync(Class entityClass, FilterNode node, FilterFuncColumn... columns)
从接口复制的说明:DataSource
获取符合过滤条件记录的聚合结果Map
等价SQL: SELECT FUNC1{column1}, FUNC2{column2}, ··· FROM {table} WHERE {filter node}
如 getNumberMapAsync(User.class, (FilterNode)null, new FilterFuncColumn(FilterFunc.MAX, "createtime")) 等价于: SELECT MAX(createtime) FROM {table}- 类型参数:
N
- Number- 参数:
entityClass
- Entity类node
- 过滤条件columns
- 聚合字段- 返回:
- 聚合结果Map
-
queryColumnMap
public <T,K extends Serializable,N extends Number> Map<K,N> queryColumnMap(Class<T> entityClass, String keyColumn, FilterFunc func, String funcColumn, FilterNode node)
从接口复制的说明:DataSource
查询符合过滤条件记录的GROUP BY聚合结果Map
等价SQL: SELECT keyColumn, FUNC{funcColumn} FROM {table} WHERE {filter node} GROUP BY {keyColumn}
如 queryColumnMapAsync(User.class, "name", FilterFunc.MAX, "createtime", (FilterNode)null) 等价于: SELECT name, MAX(createtime) FROM user GROUP BY name- 类型参数:
T
- Entity泛型K
- Key字段的数据类型N
- Number- 参数:
entityClass
- Entity类keyColumn
- Key字段func
- 聚合函数funcColumn
- 聚合字段node
- 过滤条件- 返回:
- 聚合结果Map
-
queryColumnMapAsync
public <T,K extends Serializable,N extends Number> CompletableFuture<Map<K,N>> queryColumnMapAsync(Class<T> entityClass, String keyColumn, FilterFunc func, String funcColumn, FilterNode node)
从接口复制的说明:DataSource
查询符合过滤条件记录的GROUP BY聚合结果Map
等价SQL: SELECT keyColumn, FUNC{funcColumn} FROM {table} WHERE {filter node} GROUP BY {keyColumn}
如 queryColumnMapAsync(User.class, "name", FilterFunc.MAX, "createtime", (FilterNode)null) 等价于: SELECT name, MAX(createtime) FROM user GROUP BY name- 类型参数:
T
- Entity泛型K
- Key字段的数据类型N
- Number- 参数:
entityClass
- Entity类keyColumn
- Key字段func
- 聚合函数funcColumn
- 聚合字段node
- 过滤条件- 返回:
- 聚合结果Map CompletableFuture
-
queryColumnMap
public <T,K extends Serializable,N extends Number> Map<K,N[]> queryColumnMap(Class<T> entityClass, ColumnNode[] funcNodes, String groupByColumn, FilterNode node)
从接口复制的说明:DataSource
查询符合过滤条件记录的GROUP BY聚合结果Map
等价SQL: SELECT col1, FUNC{funcColumn1}, FUNC{funcColumn2} FROM {table} WHERE {filter node} GROUP BY {col1}
如 queryColumnMapAsync(OrderRecord.class, Utility.ofArray(ColumnExpNode.div(ColumnFuncNode.sum("money"), 100), ColumnFuncNode.avg(ColumnExpNode.dec("money", 20)))), "targetid", (FilterNode)null) 等价于: SELECT targetid, SUM(money) / 100, AVG(money - 20) FROM orderrecord GROUP BY targetid- 类型参数:
T
- Entity泛型K
- Key字段的数据类型N
- Number- 参数:
entityClass
- Entity类funcNodes
- ColumnNode[]groupByColumn
- GROUP BY字段node
- 过滤条件- 返回:
- 聚合结果Map CompletableFuture
-
queryColumnMapAsync
public <T,K extends Serializable,N extends Number> CompletableFuture<Map<K,N[]>> queryColumnMapAsync(Class<T> entityClass, ColumnNode[] funcNodes, String groupByColumn, FilterNode node)
从接口复制的说明:DataSource
查询符合过滤条件记录的GROUP BY聚合结果Map
等价SQL: SELECT col1, FUNC{funcColumn1}, FUNC{funcColumn2} FROM {table} WHERE {filter node} GROUP BY {col1}
如 queryColumnMapAsync(OrderRecord.class, Utility.ofArray(ColumnExpNode.div(ColumnFuncNode.sum("money"), 100), ColumnFuncNode.avg(ColumnExpNode.dec("money", 20)))), "targetid", (FilterNode)null) 等价于: SELECT targetid, SUM(money) / 100, AVG(money - 20) FROM orderrecord GROUP BY targetid- 类型参数:
T
- Entity泛型K
- Key字段的数据类型N
- Number- 参数:
entityClass
- Entity类funcNodes
- ColumnNode[]groupByColumn
- GROUP BY字段node
- 过滤条件- 返回:
- 聚合结果Map CompletableFuture
-
queryColumnMap
public <T,K extends Serializable,N extends Number> Map<K[],N[]> queryColumnMap(Class<T> entityClass, ColumnNode[] funcNodes, String[] groupByColumns, FilterNode node)
从接口复制的说明:DataSource
查询符合过滤条件记录的GROUP BY聚合结果Map
等价SQL: SELECT col1, col2, FUNC{funcColumn1}, FUNC{funcColumn2} FROM {table} WHERE {filter node} GROUP BY {col1}, {col2}
如 queryColumnMapAsync(OrderRecord.class, Utility.ofArray(ColumnExpNode.div(ColumnFuncNode.sum("money"), 100), ColumnFuncNode.avg(ColumnExpNode.dec("money", 20)))), Utility.ofArray("fromid", "targetid"), (FilterNode)null) 等价于: SELECT fromid, targetid, SUM(money) / 100, AVG(money - 20) FROM orderrecord GROUP BY fromid, targetid- 类型参数:
T
- Entity泛型K
- Key字段的数据类型N
- Number- 参数:
entityClass
- Entity类funcNodes
- ColumnNode[]groupByColumns
- GROUP BY字段node
- 过滤条件- 返回:
- 聚合结果Map
-
queryColumnMapAsync
public <T,K extends Serializable,N extends Number> CompletableFuture<Map<K[],N[]>> queryColumnMapAsync(Class<T> entityClass, ColumnNode[] funcNodes, String[] groupByColumns, FilterNode node)
从接口复制的说明:DataSource
查询符合过滤条件记录的GROUP BY聚合结果Map
等价SQL: SELECT col1, col2, FUNC{funcColumn1}, FUNC{funcColumn2} FROM {table} WHERE {filter node} GROUP BY {col1}, {col2}
如 queryColumnMapAsync(OrderRecord.class, Utility.ofArray(ColumnExpNode.div(ColumnFuncNode.sum("money"), 100), ColumnFuncNode.avg(ColumnExpNode.dec("money", 20)))), Utility.ofArray("fromid", "targetid"), (FilterNode)null) 等价于: SELECT fromid, targetid, SUM(money) / 100, AVG(money - 20) FROM orderrecord GROUP BY fromid, targetid- 类型参数:
T
- Entity泛型K
- Key字段的数据类型N
- Number- 参数:
entityClass
- Entity类funcNodes
- ColumnNode[]groupByColumns
- GROUP BY字段node
- 过滤条件- 返回:
- 聚合结果Map CompletableFuture
-
find
public <T> T find(Class<T> clazz, SelectColumn selects, Serializable pk)
从接口复制的说明:DataSource
获取指定主键值的单个记录, 返回null表示不存在值
等价SQL: SELECT {column1},{column2}, ··· FROM {table} WHERE {primary} = {id}- 类型参数:
T
- Entity泛型- 参数:
clazz
- Entity类selects
- 指定字段pk
- 主键值- 返回:
- Entity对象
-
findAsync
public <T> CompletableFuture<T> findAsync(Class<T> clazz, SelectColumn selects, Serializable pk)
从接口复制的说明:DataSource
获取指定主键值的单个记录, 返回null表示不存在值
等价SQL: SELECT {column1},{column2}, ··· FROM {table} WHERE {primary} = {id}- 类型参数:
T
- Entity泛型- 参数:
clazz
- Entity类selects
- 指定字段pk
- 主键值- 返回:
- Entity对象CompletableFuture
-
finds
public <T> T[] finds(Class<T> clazz, SelectColumn selects, Serializable... pks)
从接口复制的说明:DataSource
获取指定主键值的多个记录, 返回数组,数组长度与pks一样
等价SQL: SELECT {column1},{column2}, ··· FROM {table} WHERE {primary} = {id1,id2, ···}- 类型参数:
T
- Entity泛型- 参数:
clazz
- Entity类selects
- 指定字段pks
- 主键值集合- 返回:
- Entity对象
-
findsAsync
public <T> CompletableFuture<T[]> findsAsync(Class<T> clazz, SelectColumn selects, Serializable... pks)
从接口复制的说明:DataSource
获取指定主键值的多个记录, 返回数组,数组长度与pks一样
等价SQL: SELECT {column1},{column2}, ··· FROM {table} WHERE {primary} = {id1,id2, ···}- 类型参数:
T
- Entity泛型- 参数:
clazz
- Entity类selects
- 指定字段pks
- 主键值集合- 返回:
- Entity对象CompletableFuture
-
findsList
public <D extends Serializable,T> List<T> findsList(Class<T> clazz, Stream<D> pks)
从接口复制的说明:DataSource
获取指定主键值的多个记录, 返回列表
等价SQL: SELECT {column1},{column2}, ··· FROM {table} WHERE {primary} = {id1,id2, ···}- 类型参数:
D
- 主键泛型T
- Entity泛型- 参数:
clazz
- Entity类pks
- 主键值集合- 返回:
- Entity对象
-
findsListAsync
public <D extends Serializable,T> CompletableFuture<List<T>> findsListAsync(Class<T> clazz, Stream<D> pks)
从接口复制的说明:DataSource
获取指定主键值的多个记录, 返回列表
等价SQL: SELECT {column1},{column2}, ··· FROM {table} WHERE {primary} = {id1,id2, ···}- 类型参数:
D
- 主键泛型T
- Entity泛型- 参数:
clazz
- Entity类pks
- 主键值集合- 返回:
- Entity对象
-
find
public <T> T find(Class<T> clazz, SelectColumn selects, FilterNode node)
从接口复制的说明:DataSource
获取符合过滤条件单个记录, 返回null表示不存在值
等价SQL: SELECT {column1},{column2}, ··· FROM {table} WHERE {filter node}- 类型参数:
T
- Entity泛型- 参数:
clazz
- Entity类selects
- 指定字段node
- 过滤条件- 返回:
- Entity对象
-
findAsync
public <T> CompletableFuture<T> findAsync(Class<T> clazz, SelectColumn selects, FilterNode node)
从接口复制的说明:DataSource
获取符合过滤条件单个记录, 返回null表示不存在值
等价SQL: SELECT {column1},{column2}, ··· FROM {table} WHERE {filter node}- 类型参数:
T
- Entity泛型- 参数:
clazz
- Entity类selects
- 指定字段node
- 过滤条件- 返回:
- Entity对象 CompletableFuture
-
findColumn
public <T> Serializable findColumn(Class<T> clazz, String column, Serializable defValue, Serializable pk)
从接口复制的说明:DataSource
获取符合过滤条件单个记录的单个字段值, 不存在值则返回默认值
等价SQL: SELECT {column} FROM {table} WHERE {primary} = {id}- 类型参数:
T
- Entity泛型- 参数:
clazz
- Entity类column
- 字段名defValue
- 默认值pk
- 主键值- 返回:
- 字段值
-
findColumnAsync
public <T> CompletableFuture<Serializable> findColumnAsync(Class<T> clazz, String column, Serializable defValue, Serializable pk)
从接口复制的说明:DataSource
获取符合过滤条件单个记录的单个字段值, 不存在值则返回默认值
等价SQL: SELECT {column} FROM {table} WHERE {primary} = {id}- 类型参数:
T
- Entity泛型- 参数:
clazz
- Entity类column
- 字段名defValue
- 默认值pk
- 主键值- 返回:
- 字段值 CompletableFuture
-
findColumn
public <T> Serializable findColumn(Class<T> clazz, String column, Serializable defValue, FilterNode node)
从接口复制的说明:DataSource
获取符合过滤条件单个记录的单个字段值, 不存在值则返回默认值
等价SQL: SELECT {column} FROM {table} WHERE {filter node}- 类型参数:
T
- Entity泛型- 参数:
clazz
- Entity类column
- 字段名defValue
- 默认值node
- 过滤条件- 返回:
- 字段值
-
findColumnAsync
public <T> CompletableFuture<Serializable> findColumnAsync(Class<T> clazz, String column, Serializable defValue, FilterNode node)
从接口复制的说明:DataSource
获取符合过滤条件单个记录的单个字段值, 不存在值则返回默认值
等价SQL: SELECT {column} FROM {table} WHERE {filter node}- 类型参数:
T
- Entity泛型- 参数:
clazz
- Entity类column
- 字段名defValue
- 默认值node
- 过滤条件- 返回:
- 字段值 CompletableFuture
-
exists
public <T> boolean exists(Class<T> clazz, Serializable pk)
从接口复制的说明:DataSource
判断是否存在主键值的记录
等价SQL: SELECT COUNT(*) FROM {table} WHERE {primary} = {id}- 类型参数:
T
- Entity泛型- 参数:
clazz
- Entity类pk
- 主键值- 返回:
- 是否存在
-
existsAsync
public <T> CompletableFuture<Boolean> existsAsync(Class<T> clazz, Serializable pk)
从接口复制的说明:DataSource
判断是否存在主键值的记录
等价SQL: SELECT COUNT(*) FROM {table} WHERE {primary} = {id}- 类型参数:
T
- Entity泛型- 参数:
clazz
- Entity类pk
- 主键值- 返回:
- 是否存在CompletableFuture
-
exists
public <T> boolean exists(Class<T> clazz, FilterNode node)
从接口复制的说明:DataSource
判断是否存在符合过滤条件的记录
等价SQL: SELECT COUNT(*) FROM {table} WHERE {filter node}- 类型参数:
T
- Entity泛型- 参数:
clazz
- Entity类node
- 过滤条件- 返回:
- 是否存在
-
existsAsync
public <T> CompletableFuture<Boolean> existsAsync(Class<T> clazz, FilterNode node)
从接口复制的说明:DataSource
判断是否存在符合过滤条件的记录
等价SQL: SELECT COUNT(*) FROM {table} WHERE {filter node}- 类型参数:
T
- Entity泛型- 参数:
clazz
- Entity类node
- 过滤条件- 返回:
- 是否存在CompletableFuture
-
queryColumnSet
public <T,V extends Serializable> Set<V> queryColumnSet(String selectedColumn, Class<T> clazz, Flipper flipper, FilterNode node)
从接口复制的说明:DataSource
查询符合过滤条件记录的某个字段Set集合
等价SQL: SELECT DISTINCT {selectedColumn} FROM {table} WHERE {filter node} ORDER BY {flipper.sort} LIMIT {flipper.limit}- 类型参数:
T
- Entity泛型V
- 字段类型- 参数:
selectedColumn
- 指定字段clazz
- Entity类flipper
- 翻页对象node
- 过滤条件- 返回:
- 字段值的集合
-
queryColumnSetAsync
public <T,V extends Serializable> CompletableFuture<Set<V>> queryColumnSetAsync(String selectedColumn, Class<T> clazz, Flipper flipper, FilterNode node)
从接口复制的说明:DataSource
查询符合过滤条件记录的某个字段Set集合
等价SQL: SELECT DISTINCT {selectedColumn} FROM {table} WHERE {filter node} ORDER BY {flipper.sort} LIMIT {flipper.limit}- 类型参数:
T
- Entity泛型V
- 字段类型- 参数:
selectedColumn
- 指定字段clazz
- Entity类flipper
- 翻页对象node
- 过滤条件- 返回:
- 字段值的集合CompletableFuture
-
queryColumnList
public <T,V extends Serializable> List<V> queryColumnList(String selectedColumn, Class<T> clazz, Flipper flipper, FilterNode node)
从接口复制的说明:DataSource
查询符合过滤条件记录的某个字段List集合
等价SQL: SELECT {selectedColumn} FROM {table} WHERE {filter node} ORDER BY {flipper.sort} LIMIT {flipper.limit}- 类型参数:
T
- Entity泛型V
- 字段类型- 参数:
selectedColumn
- 指定字段clazz
- Entity类flipper
- 翻页对象node
- 过滤条件- 返回:
- 字段值的集合
-
queryColumnListAsync
public <T,V extends Serializable> CompletableFuture<List<V>> queryColumnListAsync(String selectedColumn, Class<T> clazz, Flipper flipper, FilterNode node)
从接口复制的说明:DataSource
查询符合过滤条件记录的某个字段List集合
等价SQL: SELECT {selectedColumn} FROM {table} WHERE {filter node} ORDER BY {flipper.sort} LIMIT {flipper.limit}- 类型参数:
T
- Entity泛型V
- 字段类型- 参数:
selectedColumn
- 指定字段clazz
- Entity类flipper
- 翻页对象node
- 过滤条件- 返回:
- 字段值的集合CompletableFuture
-
queryColumnSheet
public <T,V extends Serializable> Sheet<V> queryColumnSheet(String selectedColumn, Class<T> clazz, Flipper flipper, FilterNode node)
从接口复制的说明:DataSource
查询符合过滤条件记录的某个字段Sheet集合
等价SQL: SELECT {selectedColumn} FROM {table} WHERE {filter bean} ORDER BY {flipper.sort} LIMIT {flipper.limit}- 类型参数:
T
- Entity泛型V
- 字段类型- 参数:
selectedColumn
- 指定字段clazz
- Entity类flipper
- 翻页对象node
- 过滤条件- 返回:
- 字段值的集合
-
queryColumnSheetAsync
public <T,V extends Serializable> CompletableFuture<Sheet<V>> queryColumnSheetAsync(String selectedColumn, Class<T> clazz, Flipper flipper, FilterNode node)
从接口复制的说明:DataSource
查询符合过滤条件记录的某个字段Sheet集合
等价SQL: SELECT {selectedColumn} FROM {table} WHERE {filter bean} ORDER BY {flipper.sort} LIMIT {flipper.limit}- 类型参数:
T
- Entity泛型V
- 字段类型- 参数:
selectedColumn
- 指定字段clazz
- Entity类flipper
- 翻页对象node
- 过滤条件- 返回:
- 字段值的集合CompletableFuture
-
queryMap
public <K extends Serializable,T> Map<K,T> queryMap(Class<T> clazz, SelectColumn selects, Stream<K> keyStream)
从接口复制的说明:DataSource
查询符合过滤条件记录的List转Map集合, key=主键值, value=Entity对象
等价SQL: SELECT * FROM {table} WHERE id IN {ids}- 类型参数:
K
- 主键泛型T
- Entity泛型- 参数:
clazz
- Entity类selects
- 指定字段keyStream
- 主键Stream- 返回:
- Entity的集合
-
queryMapAsync
public <K extends Serializable,T> CompletableFuture<Map<K,T>> queryMapAsync(Class<T> clazz, SelectColumn selects, Stream<K> keyStream)
从接口复制的说明:DataSource
查询符合过滤条件记录的List转Map集合, key=主键值, value=Entity对象
等价SQL: SELECT * FROM {table} WHERE id IN {ids}- 类型参数:
K
- 主键泛型T
- Entity泛型- 参数:
clazz
- Entity类selects
- 指定字段keyStream
- 主键Stream- 返回:
- Entity的集合CompletableFuture
-
queryMap
public <K extends Serializable,T> Map<K,T> queryMap(Class<T> clazz, SelectColumn selects, FilterNode node)
从接口复制的说明:DataSource
查询符合过滤条件记录的List转Map集合, key=主键值, value=Entity对象
等价SQL: SELECT * FROM {table} WHERE {filter node}- 类型参数:
K
- 主键泛型T
- Entity泛型- 参数:
clazz
- Entity类selects
- 指定字段node
- FilterNode- 返回:
- Entity的集合
-
queryMapAsync
public <K extends Serializable,T> CompletableFuture<Map<K,T>> queryMapAsync(Class<T> clazz, SelectColumn selects, FilterNode node)
从接口复制的说明:DataSource
查询符合过滤条件记录的List转Map集合, key=主键值, value=Entity对象
等价SQL: SELECT * FROM {table} WHERE {filter node}- 类型参数:
K
- 主键泛型T
- Entity泛型- 参数:
clazz
- Entity类selects
- 指定字段node
- FilterNode- 返回:
- Entity的集合CompletableFuture
-
querySet
public <T> Set<T> querySet(Class<T> clazz, SelectColumn selects, Flipper flipper, FilterNode node)
从接口复制的说明:DataSource
查询符合过滤条件记录的Set集合
等价SQL: SELECT DISTINCT {column1},{column2}, ··· FROM {table} WHERE {filter node} ORDER BY {flipper.sort} LIMIT {flipper.limit}- 类型参数:
T
- Entity泛型- 参数:
clazz
- Entity类selects
- 指定字段flipper
- 翻页对象node
- 过滤条件- 返回:
- Entity的集合
-
querySetAsync
public <T> CompletableFuture<Set<T>> querySetAsync(Class<T> clazz, SelectColumn selects, Flipper flipper, FilterNode node)
从接口复制的说明:DataSource
查询符合过滤条件记录的Set集合
等价SQL: SELECT DISTINCT {column1},{column2}, ··· FROM {table} WHERE {filter node} ORDER BY {flipper.sort} LIMIT {flipper.limit}- 类型参数:
T
- Entity泛型- 参数:
clazz
- Entity类selects
- 指定字段flipper
- 翻页对象node
- 过滤条件- 返回:
- Entity的集合CompletableFuture
-
queryList
public <T> List<T> queryList(Class<T> clazz, SelectColumn selects, Flipper flipper, FilterNode node)
从接口复制的说明:DataSource
查询符合过滤条件记录的List集合
等价SQL: SELECT {column1},{column2}, ··· FROM {table} WHERE {filter node} ORDER BY {flipper.sort} LIMIT {flipper.limit}- 类型参数:
T
- Entity泛型- 参数:
clazz
- Entity类selects
- 指定字段flipper
- 翻页对象node
- 过滤条件- 返回:
- Entity的集合
-
queryListAsync
public <T> CompletableFuture<List<T>> queryListAsync(Class<T> clazz, SelectColumn selects, Flipper flipper, FilterNode node)
从接口复制的说明:DataSource
查询符合过滤条件记录的List集合
等价SQL: SELECT {column1},{column2}, ··· FROM {table} WHERE {filter node} ORDER BY {flipper.sort} LIMIT {flipper.limit}- 类型参数:
T
- Entity泛型- 参数:
clazz
- Entity类selects
- 指定字段flipper
- 翻页对象node
- 过滤条件- 返回:
- Entity的集合CompletableFuture
-
querySheet
public <T> Sheet<T> querySheet(Class<T> clazz, SelectColumn selects, Flipper flipper, FilterNode node)
从接口复制的说明:DataSource
查询符合过滤条件记录的Sheet集合
等价SQL: SELECT {column1},{column2}, ··· FROM {table} WHERE {filter node} ORDER BY {flipper.sort} LIMIT {flipper.limit}- 类型参数:
T
- Entity泛型- 参数:
clazz
- Entity类selects
- 指定字段flipper
- 翻页对象node
- 过滤条件- 返回:
- Entity的集合
-
querySheetAsync
public <T> CompletableFuture<Sheet<T>> querySheetAsync(Class<T> clazz, SelectColumn selects, Flipper flipper, FilterNode node)
从接口复制的说明:DataSource
查询符合过滤条件记录的Sheet集合
等价SQL: SELECT {column1},{column2}, ··· FROM {table} WHERE {filter node} ORDER BY {flipper.sort} LIMIT {flipper.limit}- 类型参数:
T
- Entity泛型- 参数:
clazz
- Entity类selects
- 指定字段flipper
- 翻页对象node
- 过滤条件- 返回:
- Entity的集合CompletableFuture
-
-