类 Datastore
java.lang.Object
com.sh.javax.datastore.Datastore
- 所有已实现的接口:
DatastoreInterface,Serializable,Cloneable
- 直接已知子类:
FileDatastore,JSONDatastore
Datastore类实现了DatastoreInterface接口以及Serializable接口,该类的主要功能是接收
JDBC从数据库中获取的记录集,从而可以摆脱JDBC对于数据库的访问依赖于游标的情况。
同时,该类提供了对记录集添加、修改、删除、排序、查找等多种方便灵活的数据操作方式,
是开发数据库用的基础。
具体的方法调用说明参见DatastoreInterface。
构造方法:
一:通过DataCenter查询数据库中数据返回值;
二:自定义构造,如下形式:
Datastore ds = new Datastore(); ds.insertColumn(-1, "user_id", Datastore.STRING, "用户编号"); ds.insertColumn(-1, "user_name", Datastore.STRING, "用户姓名"); int rowNo = ds.insertRow(-1); ds.setItem(rowNo, "user_id", "admin"); ds.setItem(rowNo, "user_name", "系统管理员");
- 另请参阅:
-
嵌套类概要
嵌套类 -
字段概要
字段修饰符和类型字段说明protected intprotected LinkedList<RowInfo>protected intprotected Stringprotected booleanprotected intprotected LinkedList<HeaderInfo>protected booleanprotected Stringprotected static final org.apache.logging.log4j.Loggerprotected intprotected String[]protected Object[]protected longprotected Stringprotected String从接口继承的字段 com.sh.javax.datastore.DatastoreInterface
BIGDECIMAL, BIGINT, BLOB, CLOB, DATAMODIFYED, DATATYPE_UNDEFINE, DATE, DELETE, DOUBLE, FILTER, FLOAT, INTEGER, NEW, NEWMODIFYED, NOTMODIFYED, OBJECT, PRIMARY, STRING, TIME, TIMESTAMP -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidaddGloableData(String key, Object value) addRowData(RowInfo rowInfo) addRowData(RowInfo rowInfo, int rowNo) 添加行数据double求平均值double求平均值booleanchangeColumnName(String colName, String newColName) 修改列名protected voidclearAll()清空重置当前数据集void恢复过滤条件状态clone()Datastore的克隆方法,实现思路是,先将Datastore序列化到一个数组,再通过数组重新构造一个Datastoreint返回PRIMARY缓冲区内数据总列数。concat(String columnName, String beginToken, String endToken, boolean isRepeat, String defaultValue) 获取连接的字符串concatWithNoRepeat(String columnName) 生成不允许重复的连接字符串concatWithNoRepeat(String columnName, String beginToken, String endToken) 生成没有重复的将当前Datastore转换成XMLDatastoreconvert2XMLDatastore(Format[] ft) 将当前Datastore转换成XMLDatastore,同时格式化每一列数据copy()复制当前对象copy(int start, int end) 复制指定行数的记录int求记录数voiddeleteColumn(int colNo) 从数据集中删除一列数据intvoid删除重复的行只保留一行booleandeleteRow(int row) 删除一行intfilter()根据设置的条件进行过滤int过虑数据,实时生效int取得过滤缓冲中记录的条数protected booleanintint查找voidforEach(BiConsumer<? super RowInfo, ? super DsIterator> action) voidgetBlobInputStream(int row, int column) 获取数据集中单元格的Blob数据getBlobInputStream(int row, String column) 获取数据集中单元格的Blob数据getClobInputStream(int row, int column) 获取CLOB字段的输入流getClobInputStream(int row, String column) 获取CLOB字段的输入流getClobReader(int row, int column) 获取CLOB字段的字符流getClobReader(int row, String column) 获取CLOB字段的字符流getClobString(int row, int column) getClobString(int row, int column, String enter) 获取CLOB字段的字符串值,适用于小字符串getClobString(int row, String column) getClobString(int row, String column, String enter) 获取CLOB字段的字符串值,适用于小字符串getClobString2(int row, int column) getClobString2(int row, String column) intgetColumnIndexByName(String colName) getColumnName(int index) 按索引取列名getColumnName2(int index) 按索引取列名intgetColumnType(int index) 取得列的数据类型,返回PRIMARY缓冲区指定索引(列名)的数据类型。intgetColumnType(String column) 按列名取列数据类型getData()获取主数据获取子数据集,非线程安全getFilterDatastore(String colName, String value) 获取子数据集,非线程安全getGloableData(String key) getGloableData(String key, Object defaultValue) 获取表头getItemBigDecimal(int row, int colindex) getItemBigDecimal(int row, String column) getItemDate(int row, int column) 获取数据集中单元格的Date数据getItemDate(int row, int column, int buffer, boolean originalvalue) getItemDate(int row, String column) 获取数据集中单元格的Date数据getItemDate(int row, String column, int buffer, boolean originalvalue) getItemDouble(int row, int column) 获取数据集中单元格的Double数据,如果为空,返回默认值getItemDouble(int row, int column, int buffer, boolean originalvalue) getItemDouble(int row, String column) 功能同getItemDouble,只是返回基本数据类型getItemDouble(int row, String column, int buffer, boolean originalvalue) doublegetItemDouble2(int row, int column) 功能同getItemDouble,只是返回基本数据类型doublegetItemDouble2(int row, String column) 功能同getItemDouble,只是返回基本数据类型intgetItemDouble2Int(int row, int column) 获取数据集中单元格的Double数据,并转化为intintgetItemDouble2Int(int row, String column) 获取数据集中单元格的Double数据,并转化为intlonggetItemDouble2Long(int row, int column) 获取数据集中单元格的Double数据,并转化为longlonggetItemDouble2Long(int row, String column) 获取数据集中单元格的Double数据,并转化为longgetItemDouble2String(int row, int column) 获取数据集中单元格的Double数据,并转化为StringgetItemDouble2String(int row, int column, String format) 获取数据集中单元格的Double数据,并转化为StringgetItemDouble2String(int row, String column) 获取数据集中单元格的Double数据,并转化为StringgetItemDouble2String(int row, String column, String format) 获取数据集中单元格的Double数据,并转化为StringgetItemDoubleEx(int row, int column) 获取数据集中单元格的Double数据getItemDoubleEx(int row, String column) 获取数据集中单元格的Double数据getItemFloat(int row, int column) 获取数据集中单元格的Float数据getItemFloat(int row, int column, int buffer, boolean originalvalue) getItemFloat(int row, String column) 获取数据集中单元格的Float数据getItemFloat(int row, String column, int buffer, boolean originalvalue) floatgetItemFloat2(int row, int column) 获取数据集中单元格的Float数据,并转化为floatfloatgetItemFloat2(int row, String column) 获取数据集中单元格的Float数据,并转化为floatintgetItemFloat2Int(int row, int column) 获取数据集中单元格的Float数据,并转化为intintgetItemFloat2Int(int row, String column) 获取数据集中单元格的Float数据,并转化为intgetItemFloat2String(int row, int column) 获取数据集中单元格的Float数据,并转化为StringgetItemFloat2String(int row, int column, String format) 获取数据集中单元格的Float数据,并转化为StringgetItemFloat2String(int row, String column) 获取数据集中单元格的Float数据,并转化为StringgetItemFloat2String(int row, String column, String format) 获取数据集中单元格的Float数据,并转化为StringgetItemInteger(int row, int column) 获取数据集中单元格的Integer数据getItemInteger(int row, int column, int buffer, boolean originalvalue) getItemInteger(int row, String column) 获取数据集中单元格的Integer数据getItemInteger(int row, String column, int buffer, boolean originalvalue) intgetItemInteger2(int row, int column) 获取数据集中单元格的int数据intgetItemInteger2(int row, String column) 获取数据集中单元格的int数据getItemInteger2String(int row, String column) 获取整形值,并将其转化为String类型getItemLong(int row, int column) 获取数据集中单元格的Long数据getItemLong(int row, int column, int buffer, boolean originalvalue) getItemLong(int row, String column) 获取数据集中单元格的Long数据getItemLong(int row, String column, int buffer, boolean originalvalue) longgetItemLong2(int row, int column) 获取数据集中单元格的Long数据longgetItemLong2(int row, String column) 获取数据集中单元格的long数据getItemLong2String(int row, String column) 获取整形值,并将其转化为String类型getItemObjectString(int row, int column) 获取字符串数据对象getItemObjectString(int row, int column, String toZoneId) getItemObjectString(int row, String column) 获取字符串对象getItemObjectString(int row, String column, String toZoneId) getItemObjectString2(int row, int column) getItemObjectString2(int row, String column) intgetItemStatus(int row, int column) 取得PRIMARY缓冲区指定行列的状态。intgetItemStatus(int row, int column, int dwbuffer) 取得指定缓冲区指定行列的状态。intgetItemStatus(int row, String column) intgetItemStatus(int row, String column, int dwbuffer) getItemString(int row, int column) 获取数据集中单元格的String数据getItemString(int row, int column, int buffer, boolean originalvalue) getItemString(int row, String column) 获取数据集中单元格的String数据getItemString(int row, String column, int buffer, boolean originalvalue) getItemString2(int row, int column) 获取数据集中单元格的String数据,如果为空,返回默认值getItemString2(int row, String column) 获取数据集中单元格的String数据,如果为空,返回默认值getItemTime(int row, int column) 获取数据集中单元格的Time数据getItemTime(int row, int column, int buffer, boolean originalvalue) getItemTime(int row, String column) 获取数据集中单元格的Time数据getItemTime(int row, String column, int buffer, boolean originalvalue) getItemTimestamp(int row, int column) 获取数据集中单元格的Timestamp数据getItemTimestamp(int row, int column, int buffer, boolean originalvalue) getItemTimestamp(int row, int column, String format) 获取时间类型数据getItemTimestamp(int row, int column, String format, String toZone) getItemTimestamp(int row, String column) 获取数据集中单元格的Timestamp数据getItemTimestamp(int row, String column, int buffer, boolean originalvalue) getItemTimestamp(int row, String column, String format) 获取时间类型数据getItemTimestamp(int row, String column, String format, String toZone) getLabel(int index) getObject(int row, int column) 获取数据集中单元格的数据getObject(int row, int column, int buffer, boolean originalvalue) 获取数据集中单元格的数据getRowData(int rowNo) 获取指定行的附加数据,数据的范围是主缓冲getRowInfo(int row) 获取指定行对象(拷贝) row : 行号 成功返回RowInfo对象,失败返回null.getRowInfo(int row, int buffer) getRowInfoRef(int row) 获取指定行对象(引用) row : 行号 成功返回RowInfo对象,失败返回null.getRowInfoRef(int row, int buffer) 获取指定行对象(引用),和getRowInfo的区别是getRowInfo是通过行克隆后取得的数据,而getRowInfoRef是直接取行的引用getSql()doublegetValueWithExpress(int rowNo, String expStr) 表达式运算doublegetValueWithExpress(String expStr) intgetValueWithExpress2(int rowNo, String expStr) intgetValueWithExpress2(String expStr) getValueWithExpress3(int rowNo, String expStr, String format) getValueWithExpress3(String expStr, String format) boolean判断是否存在列intindexofcol(String colName) 取列索引值 从1开始intinsertColumn(int colNo, String colName, int colType, String label) 在数据集中插入一个列,默认列值为nullintinsertColumn(int colNo, String colName, int colType, String label, Object defaultValue) intinsertColumn(int colNo, String colName, int colType, String label, Object defaultValue, String colName2) 在数据集中插入一个列intinsertRow(int row) 在数据集中插入一行,如果为-1表示在数据集的末尾加一行booleanbooleanbooleanisEmpty()判断是否为空booleanbooleanisPrimaryKey(int index) booleanisPrimaryKey(String column) booleanisVisible(int column) 获取指定列是否可见booleaniterator()获取迭代嚣iterator(int rowNo) 获取迭代嚣doubledoubledoubledoubleprintLog()printLog(org.apache.logging.log4j.Logger log4j) printLog(org.slf4j.Logger log) voidrefresh()voidremoveGloableData(String key) booleanreset()重置数据集int还原过滤的数据introwCount()行统计,返回PRIMARY缓冲区内数据总行数。booleanrowsCopy(int startrow, int endrow, int movebuffer, Datastore targetdw, int beforerow, int targetbuffer) booleanbooleanrowsMove(int startrow, int endrow, int movebuffer, int beforerow, int targetbuffer) 在三个缓冲区内移动一行或多行数据。voidsetCacheData(boolean isCacheData) voidsetColumnData(int colindex, DsSetColumnData_I func) 设置更新一列的数据voidsetColumnData(String colName, DsSetColumnData_I func) 设置更新一列的数据voidsetData(LinkedList<RowInfo> data) 设置数据boolean设置数据集的过滤条件voidsetForEachBreak(boolean forEachBreak) voidsetHeader(LinkedList<HeaderInfo> header) 设置表头int设置单元格的值int设置单元格的值int设置单元格的值int设置单元格的值intint设置单元格的值int设置单元格的值int设置单元格的值int设置单元格的值int设置单元格的值int设置单元格的值int设置单元格的值intint设置单元格的值int设置单元格的值int设置单元格的值int设置单元格的值booleansetItemStatus(int row, int column, int status) 设置PRIMARY缓冲区指定行列的状态。booleansetItemStatus(int row, int column, int dwbuffer, int status) 设置指定缓冲区指定行列的状态。booleansetItemStatus(int row, String column, int status) booleansetItemStatus(int row, String column, int dwbuffer, int status) int设置单元格的值int设置单元格的值void设置主键voidsetRowData(int rowNo, Object rowData) 设置指定行的附加数据boolean数据集排序voidvoidsetVisible(int column, boolean visible) 设置指定列是否可见voidsetVisible(String column, boolean visible) booleansort()执行排序操作booleansort(Comparator<RowInfo> comparator) 数据集排序stream()double求和double求和int求和int求和将当前数据集中的数据保存到数据库对应的表当中toJSONArray(DatastoreJSONConfig_I config) 转化为JSONArray对象将数据集转化为Markdown格式toString()
-
字段详细资料
-
prows
protected int prows -
frows
protected int frows -
drows
protected int drows -
cols
protected int cols -
datalist
-
header
-
filter
-
sort
-
lastGetCol
-
sql
-
queryColsType
-
queryObj
-
queryTime
protected long queryTime -
isCacheData
protected boolean isCacheData -
columnIndexMap
-
log4j
protected static final org.apache.logging.log4j.Logger log4j -
gloableDataMap
-
forEachBreak
protected boolean forEachBreak
-
-
构造器详细资料
-
Datastore
public Datastore()构造函数 -
Datastore
构造函数
-
-
方法详细资料
-
addGloableData
-
getGloableData
-
getGloableData
-
isContainGlobleData
-
removeGloableData
-
insertColumn
在数据集中插入一个列,默认列值为null- 参数:
colNo- 要插入的列号,插入成功后原来的colNo将被加1;如果colNo等于-1表示在尾部加一个列colName- 列名colType- 列的类型label- 列的标签- 返回:
- 插入的列的列号
-
insertColumn
-
insertColumn
public int insertColumn(int colNo, String colName, int colType, String label, Object defaultValue, String colName2) 在数据集中插入一个列- 参数:
colNo- 要插入的列号,插入成功后原来的colNo将被加1;如果colNo等于-1表示在尾部加一个列colName- 列名colType- 列的类型label- 列的标签defaultValue- 默认列值colName2- 列名2- 返回:
- 插入的列的列号,从1开始
-
changeColumnName
修改列名- 参数:
colName- 当前列名newColName- 新的列名- 返回:
- 列不存在时,返回false
-
deleteColumn
public void deleteColumn(int colNo) 从数据集中删除一列数据- 参数:
colNo- 列号
-
clearAll
protected void clearAll()清空重置当前数据集 -
getHeader
获取表头- 返回:
- LinkedList
-
setHeader
设置表头- 参数:
header- LinkedList
-
getData
获取主数据- 返回:
- LinkedList
-
addRowData
-
addRowData
添加行数据- 参数:
rowInfo-rowNo- 从1开始- 返回:
-
setData
设置数据- 参数:
data- LinkedList
-
setFilter
设置数据集的过滤条件- 指定者:
setFilter在接口中DatastoreInterface- 参数:
filter- 过滤条件,条件的字符串的写法类似于SQL中where子句- 返回:
- 设置是否成功
-
filter
public int filter()根据设置的条件进行过滤- 指定者:
filter在接口中DatastoreInterface- 返回:
- 符合条件的记录条数
- 抛出:
FilterException- FilterException
-
filter
过虑数据,实时生效- 参数:
action-- 返回:
-
clearFilter
public void clearFilter()恢复过滤条件状态 -
filteredCount
public int filteredCount()取得过滤缓冲中记录的条数- 指定者:
filteredCount在接口中DatastoreInterface- 返回:
- 过滤缓冲中记录的条数
-
deletedCount
public int deletedCount() -
setSort
数据集排序- 指定者:
setSort在接口中DatastoreInterface- 参数:
sort- 排序方式- 返回:
- boolean
-
sort
public boolean sort()执行排序操作- 指定者:
sort在接口中DatastoreInterface- 返回:
- true|false
-
sort
数据集排序- 参数:
comparator-- 返回:
-
find
-
find
查找- 指定者:
find在接口中DatastoreInterface- 参数:
expression- 查询表达式start- 开始行号end- 结束行号- 返回:
- 符合条件的第一条记录的行号
-
rowCount
public int rowCount()从接口复制的说明:DatastoreInterface行统计,返回PRIMARY缓冲区内数据总行数。- 指定者:
rowCount在接口中DatastoreInterface- 返回:
- 行数
-
isEmpty
public boolean isEmpty()判断是否为空- 返回:
- boolean
-
columnCount
public int columnCount()从接口复制的说明:DatastoreInterface返回PRIMARY缓冲区内数据总列数。- 指定者:
columnCount在接口中DatastoreInterface- 返回:
- 列数
-
getColumnName
按索引取列名- 指定者:
getColumnName在接口中DatastoreInterface- 参数:
index- 列号,从1开始- 返回:
- 列名
-
getColumnName2
按索引取列名- 参数:
index- 列号,从1开始- 返回:
- String
-
getLabel
- 指定者:
getLabel在接口中DatastoreInterface
-
getLabel
- 指定者:
getLabel在接口中DatastoreInterface
-
setPkCol
设置主键- 参数:
cols- 主键列,不区分大小写
-
isPrimaryKey
public boolean isPrimaryKey(int index) - 指定者:
isPrimaryKey在接口中DatastoreInterface
-
isPrimaryKey
- 指定者:
isPrimaryKey在接口中DatastoreInterface
-
getColumnType
public int getColumnType(int index) 从接口复制的说明:DatastoreInterface取得列的数据类型,返回PRIMARY缓冲区指定索引(列名)的数据类型。- 指定者:
getColumnType在接口中DatastoreInterface- 参数:
index- 列号- 返回:
- 列类型
-
getColumnType
按列名取列数据类型- 指定者:
getColumnType在接口中DatastoreInterface
-
setItemStatus
public boolean setItemStatus(int row, int column, int dwbuffer, int status) 从接口复制的说明:DatastoreInterface设置指定缓冲区指定行列的状态。 Row :行号 Column:可使用列名或列号。Column为0时指定为整行。 Dwbuffer :三个缓冲区之一。 Status:状态类型,指定要设置为那个新状态。 成功返回true,失败返回false- 指定者:
setItemStatus在接口中DatastoreInterface- 参数:
row- 行号column- 列号dwbuffer- intstatus- 状态- 返回:
- boolean
-
setItemStatus
- 指定者:
setItemStatus在接口中DatastoreInterface
-
setItemStatus
public boolean setItemStatus(int row, int column, int status) 从接口复制的说明:DatastoreInterface设置PRIMARY缓冲区指定行列的状态。 Row :行号 Column:可使用列名或列号。Column为0时指定为整行。 Status:状态类型,指定要设置为那个新状态。 成功返回true,失败返回false- 指定者:
setItemStatus在接口中DatastoreInterface- 参数:
row- 行号column- 列号status- 状态- 返回:
- boolean
-
setItemStatus
- 指定者:
setItemStatus在接口中DatastoreInterface
-
getItemStatus
public int getItemStatus(int row, int column, int dwbuffer) 从接口复制的说明:DatastoreInterface取得指定缓冲区指定行列的状态。 Row :行号 Column:可使用列名或列号。Column为0时指定为整行。 Dwbuffer :三个缓冲区之一。 成功返回状态类型,失败返回-1。- 指定者:
getItemStatus在接口中DatastoreInterface- 参数:
row- 行号column- 列号dwbuffer- int- 返回:
- int
-
getItemStatus
- 指定者:
getItemStatus在接口中DatastoreInterface
-
getItemStatus
public int getItemStatus(int row, int column) 从接口复制的说明:DatastoreInterface取得PRIMARY缓冲区指定行列的状态。 Row :行号 Column:可使用列名或列号。Column为0时指定为整行。 成功返回状态类型,失败返回-1。- 指定者:
getItemStatus在接口中DatastoreInterface- 参数:
row- 行号column- 列号- 返回:
- 状态
-
getItemStatus
- 指定者:
getItemStatus在接口中DatastoreInterface- 抛出:
InvalidRowColException
-
reset
public boolean reset()重置数据集- 指定者:
reset在接口中DatastoreInterface- 返回:
- 成功返回true,失败返回false
-
insertRow
public int insertRow(int row) 在数据集中插入一行,如果为-1表示在数据集的末尾加一行- 指定者:
insertRow在接口中DatastoreInterface- 参数:
row- 插入行号 -1 表示在末尾插入- 返回:
- 返回插入后的行号
-
deleteRow
public boolean deleteRow(int row) 删除一行- 指定者:
deleteRow在接口中DatastoreInterface- 参数:
row- 待删除的行号 从1开始- 返回:
- true|false
-
filterRow
-
restoreFilterData
public int restoreFilterData()还原过滤的数据- 返回:
-
rowsMove
public boolean rowsMove(int startrow, int endrow, int movebuffer, int beforerow, int targetbuffer) 从接口复制的说明:DatastoreInterface在三个缓冲区内移动一行或多行数据。 startrow:开始行号 endrow:结束行号 movebuffer:源缓冲区。 beforerow:移动到目标缓冲区内的开始行号。 targetbuffer:目标缓冲区。- 指定者:
rowsMove在接口中DatastoreInterface- 参数:
startrow- 开始行endrow- 结束行movebuffer- 移动缓冲beforerow- inttargetbuffer- int- 返回:
- 成功返回true,失败返回false。
-
rowsCopy
-
rowsCopy
public boolean rowsCopy(int startrow, int endrow, int movebuffer, Datastore targetdw, int beforerow, int targetbuffer) -
getObject
获取数据集中单元格的数据- 指定者:
getObject在接口中DatastoreInterface- 参数:
row- 行号 从1开始column- 列号- 返回:
- Object
-
getObject
- 指定者:
getObject在接口中DatastoreInterface
-
getObject
获取数据集中单元格的数据- 指定者:
getObject在接口中DatastoreInterface- 参数:
row- 行号 从1开始column- 列名
-
getObject
- 指定者:
getObject在接口中DatastoreInterface
-
getItemDate
获取数据集中单元格的Date数据- 指定者:
getItemDate在接口中DatastoreInterface- 参数:
row- 行号 从1开始column- 列号
-
getItemDate
- 指定者:
getItemDate在接口中DatastoreInterface
-
getItemDate
获取数据集中单元格的Date数据- 指定者:
getItemDate在接口中DatastoreInterface- 参数:
row- 行号 从1开始column- 列名
-
getItemDate
- 指定者:
getItemDate在接口中DatastoreInterface
-
getItemTime
获取数据集中单元格的Time数据- 指定者:
getItemTime在接口中DatastoreInterface- 参数:
row- 行号 从1开始column- 列号
-
getItemTime
- 指定者:
getItemTime在接口中DatastoreInterface
-
getItemTime
获取数据集中单元格的Time数据- 指定者:
getItemTime在接口中DatastoreInterface- 参数:
row- 行号 从1开始column- 列名
-
getItemTime
- 指定者:
getItemTime在接口中DatastoreInterface
-
getItemTimestamp
获取数据集中单元格的Timestamp数据- 指定者:
getItemTimestamp在接口中DatastoreInterface- 参数:
row- 行号 从1开始column- 列号
-
getItemTimestamp
- 指定者:
getItemTimestamp在接口中DatastoreInterface
-
getItemTimestamp
获取时间类型数据- 参数:
row- 行column- 列format- 格式化表达式- 返回:
- String
-
getItemTimestamp
-
getItemTimestamp
获取时间类型数据- 参数:
row- 行column- 列format- 格式化表达式- 返回:
- String
-
getItemTimestamp
-
getItemTimestamp
获取数据集中单元格的Timestamp数据- 指定者:
getItemTimestamp在接口中DatastoreInterface- 参数:
row- 行号 从1开始column- 列名
-
getItemTimestamp
- 指定者:
getItemTimestamp在接口中DatastoreInterface
-
getItemInteger2
public int getItemInteger2(int row, int column) 获取数据集中单元格的int数据- 参数:
row- 行号 从1开始column- 列号- 返回:
- int类型的数据
-
getItemInteger2String
获取整形值,并将其转化为String类型- 参数:
row- 行号column- 列号- 返回:
- String
-
getItemInteger2
获取数据集中单元格的int数据- 参数:
row- 行号 从1开始column- 列名- 返回:
- int类型的数据
-
getItemInteger
获取数据集中单元格的Integer数据- 指定者:
getItemInteger在接口中DatastoreInterface- 参数:
row- 行号 从1开始column- 列- 返回:
- Integer类型的数据
-
getItemInteger
- 指定者:
getItemInteger在接口中DatastoreInterface
-
getItemInteger
获取数据集中单元格的Integer数据- 指定者:
getItemInteger在接口中DatastoreInterface- 参数:
row- 行号 从1开始column- 列- 返回:
- Integer类型的数据
-
getItemInteger
- 指定者:
getItemInteger在接口中DatastoreInterface
-
getItemLong2
public long getItemLong2(int row, int column) 获取数据集中单元格的Long数据- 参数:
row- 行号 从1开始column- 列号- 返回:
- long类型的数据
-
getItemLong2String
获取整形值,并将其转化为String类型- 参数:
row- 行号column- 列名- 返回:
- String
-
getItemLong2
获取数据集中单元格的long数据- 参数:
row- 行号 从1开始column- 列名- 返回:
- int类型的数据
-
getItemLong
获取数据集中单元格的Long数据- 参数:
row- 行号 从1开始column- 列- 返回:
- Long类型的数据
-
getItemLong
-
getItemLong
获取数据集中单元格的Long数据- 参数:
row- 行号 从1开始column- 列- 返回:
- Long类型的数据
-
getItemLong
-
getItemFloat2String
获取数据集中单元格的Float数据,并转化为String- 参数:
row- 行号 从1开始column- 列format- 格式化表达式- 返回:
- String类型的数据
-
getItemFloat2String
获取数据集中单元格的Float数据,并转化为String- 参数:
row- 行号 从1开始column- 列format- 格式化表达式- 返回:
- String类型的数据
-
getItemFloat2String
获取数据集中单元格的Float数据,并转化为String- 参数:
row- 行号 从1开始column- 列- 返回:
- String类型的数据
-
getItemFloat2String
获取数据集中单元格的Float数据,并转化为String- 参数:
row- 行号 从1开始column- 列- 返回:
- String类型的数据
-
getItemFloat2Int
public int getItemFloat2Int(int row, int column) 获取数据集中单元格的Float数据,并转化为int- 参数:
row- 行号 从1开始column- 列- 返回:
- int类型的数据
-
getItemFloat2Int
获取数据集中单元格的Float数据,并转化为int- 参数:
row- 行号 从1开始column- 列- 返回:
- int类型的数据
-
getItemFloat2
获取数据集中单元格的Float数据,并转化为float- 参数:
row- 行号 从1开始column- 列- 返回:
- float类型的数据
-
getItemFloat2
public float getItemFloat2(int row, int column) 获取数据集中单元格的Float数据,并转化为float- 参数:
row- 行号 从1开始column- 列- 返回:
- float类型的数据
-
getItemFloat
获取数据集中单元格的Float数据- 指定者:
getItemFloat在接口中DatastoreInterface- 参数:
row- 行号 从1开始column- 列- 返回:
- Float类型的数据
-
getItemFloat
- 指定者:
getItemFloat在接口中DatastoreInterface
-
getItemFloat
获取数据集中单元格的Float数据- 指定者:
getItemFloat在接口中DatastoreInterface- 参数:
row- 行号 从1开始column- 列- 返回:
- Float类型的数据
-
getItemFloat
- 指定者:
getItemFloat在接口中DatastoreInterface
-
getItemDouble2String
获取数据集中单元格的Double数据,并转化为String- 参数:
row- 行号 从1开始column- 列format- 格式化表达式- 返回:
- String类型的数据
-
getItemDouble2String
获取数据集中单元格的Double数据,并转化为String- 参数:
row- 行号 从1开始column- 列format- 格式化表达式- 返回:
- String类型的数据
-
getItemDouble2String
获取数据集中单元格的Double数据,并转化为String- 参数:
row- 行号 从1开始column- 列- 返回:
- String类型的数据
-
getItemDouble2String
获取数据集中单元格的Double数据,并转化为String- 参数:
row- 行号 从1开始column- 列- 返回:
- String类型的数据
-
getItemDouble2Long
public long getItemDouble2Long(int row, int column) 获取数据集中单元格的Double数据,并转化为long- 参数:
row- 行号 从1开始column- 列- 返回:
- long类型的数据
-
getItemDouble2Long
获取数据集中单元格的Double数据,并转化为long- 参数:
row- 行号 从1开始column- 列- 返回:
- long类型的数据
-
getItemDouble2Int
public int getItemDouble2Int(int row, int column) 获取数据集中单元格的Double数据,并转化为int- 参数:
row- 行号 从1开始column- 列- 返回:
- int类型的数据
-
getItemDouble2Int
获取数据集中单元格的Double数据,并转化为int- 参数:
row- 行号 从1开始column- 列- 返回:
- int类型的数据
-
getItemDouble2
public double getItemDouble2(int row, int column) 功能同getItemDouble,只是返回基本数据类型- 参数:
row- 行号column- 列号- 返回:
- double类型的数据
-
getItemDoubleEx
获取数据集中单元格的Double数据- 指定者:
getItemDoubleEx在接口中DatastoreInterface- 参数:
row- 行号 从1开始column- 列- 返回:
- Double类型的数据
-
getItemDouble
获取数据集中单元格的Double数据,如果为空,返回默认值- 指定者:
getItemDouble在接口中DatastoreInterface- 参数:
row- 行号 从1开始column- 列- 返回:
- Double类型的数据
-
getItemDouble
- 指定者:
getItemDouble在接口中DatastoreInterface
-
getItemDouble2
功能同getItemDouble,只是返回基本数据类型- 参数:
row- 行号column- 列- 返回:
- double
-
getItemDouble
功能同getItemDouble,只是返回基本数据类型- 指定者:
getItemDouble在接口中DatastoreInterface- 参数:
row- 行号column- 列- 返回:
- Double
-
getItemDoubleEx
获取数据集中单元格的Double数据- 指定者:
getItemDoubleEx在接口中DatastoreInterface- 参数:
row- 行号 从1开始column- 列- 返回:
- Double类型的数据
-
getItemDouble
- 指定者:
getItemDouble在接口中DatastoreInterface
-
getItemBigDecimal
-
getItemBigDecimal
-
getItemString2
获取数据集中单元格的String数据,如果为空,返回默认值- 参数:
row- 行号 从1开始column- 列- 返回:
- String类型的数据
-
getItemString2
获取数据集中单元格的String数据,如果为空,返回默认值- 参数:
row- 行号 从1开始column- 列- 返回:
- String类型的数据
-
getItemString
获取数据集中单元格的String数据- 指定者:
getItemString在接口中DatastoreInterface- 参数:
row- 行号 从1开始column- 列- 返回:
- String类型的数据
-
getItemString
- 指定者:
getItemString在接口中DatastoreInterface
-
getItemString
获取数据集中单元格的String数据- 指定者:
getItemString在接口中DatastoreInterface- 参数:
row- 行号 从1开始column- 列- 返回:
- String类型的数据
-
getItemString
- 指定者:
getItemString在接口中DatastoreInterface
-
getBlobInputStream
获取数据集中单元格的Blob数据- 参数:
row- 行号 从1开始column- 列- 返回:
- InputStream类型的数据
-
getBlobInputStream
获取数据集中单元格的Blob数据- 参数:
row- 行号 从1开始column- 列- 返回:
- InputStream类型的数据
-
getClobReader
获取CLOB字段的字符流- 参数:
row- 行号column- 列- 返回:
- Reader对象,没有时返回null
-
getClobReader
获取CLOB字段的字符流- 参数:
row- 行号column- 列- 返回:
- 没有时返回null
-
getClobInputStream
获取CLOB字段的输入流- 参数:
row- 行号column- 列- 返回:
- 没有时返回null
-
getClobInputStream
获取CLOB字段的输入流- 参数:
row- 行号column- 列- 返回:
- 没有值时返回null
-
getClobString
-
getClobString2
-
getClobString
获取CLOB字段的字符串值,适用于小字符串- 参数:
row- 行号column- 列enter- 换行符- 返回:
- 返回字符串
-
getClobString
-
getClobString2
-
getClobString
获取CLOB字段的字符串值,适用于小字符串- 参数:
row- 行号column- 列enter- 换行符- 返回:
- String
-
getItemObjectString
获取字符串对象- 参数:
row- 行号column- 列名- 返回:
- String
-
getItemObjectString
-
getItemObjectString
获取字符串数据对象- 参数:
row- 行号column- 列号- 返回:
- String
-
getItemObjectString
-
getItemObjectString2
-
getItemObjectString2
-
setColumnData
设置更新一列的数据- 参数:
colName- 列名func- 回调函数,返回值为设置值
-
setColumnData
设置更新一列的数据- 参数:
colindex- 列索引号 从1开始func- 回调函数,返回值为设置值
-
setItem
设置单元格的值- 指定者:
setItem在接口中DatastoreInterface- 参数:
row- 行号column- 列value- 时间类型值- 返回:
- 1 设置成功 -1 设置失败
-
setItem
设置单元格的值- 指定者:
setItem在接口中DatastoreInterface- 参数:
row- 行号column- 列value- 时间类型值- 返回:
- 1 设置成功 -1 设置失败
-
setItem
设置单元格的值- 指定者:
setItem在接口中DatastoreInterface- 参数:
row- 行号column- 列value- 时间类型值- 返回:
- 1 设置成功 -1 设置失败
-
setItem
设置单元格的值- 指定者:
setItem在接口中DatastoreInterface- 参数:
row- 行号column- 列value- Double类型值- 返回:
- 1 设置成功 -1 设置失败
-
setItem
设置单元格的值- 指定者:
setItem在接口中DatastoreInterface- 参数:
row- 行号column- 列value- Float类型值- 返回:
- 1 设置成功 -1 设置失败
-
setItem
设置单元格的值- 指定者:
setItem在接口中DatastoreInterface- 参数:
row- 行号column- 列value- Integer类型值- 返回:
- 1 设置成功 -1 设置失败
-
setItem
设置单元格的值- 参数:
row- 行号column- 列value- Long类型值- 返回:
- 1 设置成功 -1 设置失败
- 抛出:
InvalidRowColException- InvalidRowColExceptionColumnTypeNotMatchException- ColumnTypeNotMatchException
-
setItem
设置单元格的值- 指定者:
setItem在接口中DatastoreInterface- 参数:
row- 行号column- 列 从1开始value- String类型值- 返回:
- 1 设置成功 -1 设置失败
-
setItem
设置单元格的值- 指定者:
setItem在接口中DatastoreInterface- 参数:
row- 行号column- 列value- 时间类型值- 返回:
- 1 设置成功 -1 设置失败
-
setItem
设置单元格的值- 指定者:
setItem在接口中DatastoreInterface- 参数:
row- 行号column- 列value- 时间类型值- 返回:
- 1 设置成功 -1 设置失败
-
setItem
设置单元格的值- 指定者:
setItem在接口中DatastoreInterface- 参数:
row- 行号column- 列value- 时间类型值- 返回:
- 1 设置成功 -1 设置失败
-
setItem
设置单元格的值- 指定者:
setItem在接口中DatastoreInterface- 参数:
row- 行号column- 列value- Double类型值- 返回:
- 1 设置成功 -1 设置失败
-
setItem
设置单元格的值- 指定者:
setItem在接口中DatastoreInterface- 参数:
row- 行号column- 列value- Float类型值- 返回:
- 1 设置成功 -1 设置失败
-
setItem
设置单元格的值- 指定者:
setItem在接口中DatastoreInterface- 参数:
row- 行号column- 列value- Integer类型值- 返回:
- 1 设置成功 -1 设置失败
-
setItem
设置单元格的值- 指定者:
setItem在接口中DatastoreInterface- 参数:
row- 行号column- 列value- String类型值- 返回:
- 1 设置成功 -1 设置失败
-
setObject
设置单元格的值- 指定者:
setObject在接口中DatastoreInterface- 参数:
row- 行号column- 列value- Object类型值- 返回:
- 1 设置成功 -1 设置失败
-
setObject
设置单元格的值- 指定者:
setObject在接口中DatastoreInterface- 参数:
row- 行号column- 列value- Object类型值- 返回:
- 1 设置成功 -1 设置失败
-
setItem
-
setItem
-
refresh
public void refresh() -
getColumnIndexByName
-
indexofcol
取列索引值 从1开始- 参数:
colName-- 返回:
-
hasColumn
判断是否存在列- 参数:
colName- 列名- 返回:
- boolean
-
getRowInfoRef
获取指定行对象(引用) row : 行号 成功返回RowInfo对象,失败返回null.- 指定者:
getRowInfoRef在接口中DatastoreInterface- 参数:
row- 行号- 返回:
- 成功返回RowInfo对象,失败返回null.
-
getRowInfoRef
获取指定行对象(引用),和getRowInfo的区别是getRowInfo是通过行克隆后取得的数据,而getRowInfoRef是直接取行的引用- 指定者:
getRowInfoRef在接口中DatastoreInterface- 参数:
row- : 行号- 返回:
- 成功返回RowInfo对象,失败返回null.
-
getRowData
获取指定行的附加数据,数据的范围是主缓冲- 参数:
rowNo- 行号- 返回:
- 行的附加数据
-
setRowData
设置指定行的附加数据- 参数:
rowNo- 行号rowData- 行附加数据
-
getRowInfo
从接口复制的说明:DatastoreInterface获取指定行对象(拷贝) row : 行号 成功返回RowInfo对象,失败返回null.- 指定者:
getRowInfo在接口中DatastoreInterface- 参数:
row- 行号- 返回:
- RowInfo
-
getRowInfo
- 指定者:
getRowInfo在接口中DatastoreInterface
-
setVisible
public void setVisible(int column, boolean visible) 从接口复制的说明:DatastoreInterface设置指定列是否可见- 指定者:
setVisible在接口中DatastoreInterface- 参数:
column- 列号visible- 是否可见
-
setVisible
- 指定者:
setVisible在接口中DatastoreInterface
-
isVisible
public boolean isVisible(int column) 从接口复制的说明:DatastoreInterface获取指定列是否可见- 指定者:
isVisible在接口中DatastoreInterface- 参数:
column- 列号- 返回:
- boolean
-
isVisible
- 指定者:
isVisible在接口中DatastoreInterface
-
convert2XMLDatastore
将当前Datastore转换成XMLDatastore,同时格式化每一列数据- 参数:
ft- 对应的每一列的格式- 返回:
- 转换后的XMLDatastore
- 抛出:
Exception- Exception
-
convert2XMLDatastore
将当前Datastore转换成XMLDatastore- 返回:
- XMLDatastore
- 抛出:
Exception- Exception
-
copy
复制当前对象- 返回:
- 与当前对象一样的深度复制后的Datastore对象
-
copy
复制指定行数的记录- 参数:
start- 开始行数end- 结束行数- 返回:
- Datastore
-
getFilterDatastore
获取子数据集,非线程安全- 参数:
filter- Datastore.DsFilter_I- 返回:
- Datastore
-
getFilterDatastore
获取子数据集,非线程安全- 参数:
colName- Stringvalue- String- 返回:
- Datastore
-
getValueWithExpress3
-
getValueWithExpress3
-
getValueWithExpress2
-
getValueWithExpress2
-
getValueWithExpress
-
getValueWithExpress
表达式运算- 参数:
rowNo- 行号,如果<=0表示求和expStr- 根据表达式计算, 表达式列为[colName]或#colName#,如:[sum(year_value)] + [month_value]- 返回:
- double
-
sum
求和- 参数:
colName- 列名- 返回:
- 指定列求和后的值
-
sum2
求和- 参数:
colName- 列名- 返回:
- 指定列求和后的值,返回int型
-
sum
求和- 参数:
colName- 列名filter- 条件表达式- 返回:
- 指定列求和后的值
-
sum2
求和- 参数:
colName- 列名filter- 条件表达式- 返回:
- 指定列求和后的值
-
max
-
min
-
max
-
min
-
avg
求平均值- 参数:
colName- 列名- 返回:
- 指定列求平均后的值
-
avg
求平均值- 参数:
colName- 列名filter- 条件表达式- 返回:
- 指定列求平均后的值
-
count
求记录数- 参数:
filter- 过滤- 返回:
- 指定条件的行数
-
toJSONArray
-
toJSONArrayWithLowerKey
-
toJSONArrayWithBeautify
-
toJSONArray
转化为JSONArray对象- 参数:
config- DatastoreJSONConfig_I- 返回:
- JSONArray
-
toMarkdown
将数据集转化为Markdown格式- 返回:
String
-
clone
Datastore的克隆方法,实现思路是,先将Datastore序列化到一个数组,再通过数组重新构造一个Datastore -
getSql
-
setSql
-
printLog
-
printLog
-
printLog
-
printLog
-
isCacheData
public boolean isCacheData() -
setCacheData
public void setCacheData(boolean isCacheData) -
concat
-
concat
-
concat
-
concatWithNoRepeat
生成不允许重复的连接字符串- 参数:
columnName- 列名- 返回:
- String
-
concatWithNoRepeat
生成没有重复的- 参数:
columnName- 列名beginToken- StringendToken- String- 返回:
- String
-
concat
public String concat(String columnName, String beginToken, String endToken, boolean isRepeat, String defaultValue) 获取连接的字符串- 参数:
columnName- 列名beginToken- StringendToken- StringisRepeat- 是否允许重复defaultValue- 允许重复时默认值- 返回:
- String
-
deleteDuplicateRow
public void deleteDuplicateRow()删除重复的行只保留一行 -
iterator
获取迭代嚣- 返回:
- DsIterator
-
forEach
-
forEach
-
isForEachBreak
public boolean isForEachBreak() -
setForEachBreak
public void setForEachBreak(boolean forEachBreak) -
iterator
获取迭代嚣- 参数:
rowNo- 开始行号,从1开始- 返回:
- DsIterator
-
stream
-
toDBBuilder
将当前数据集中的数据保存到数据库对应的表当中- 返回:
-
toString
-