public class QueryResult<T> extends Object implements List<T>, Externalizable, self.micromagic.eterna.model.AppDataLogExecute.BeanPrinter
| 限定符和类型 | 字段和说明 |
|---|---|
static int |
MAX_STORE_ITEM_COUNT
最大可保存的元素个数。
|
| 构造器和说明 |
|---|
QueryResult(Class<T> type)
创建一个空的结果对象。
|
QueryResult(Class<T> type,
QueryResult<T> other,
self.micromagic.util.converter.ValueConverter specialConverter)
根据另一个查询结果对象及转换器创建结果对象。
|
QueryResult(Class<T> type,
self.micromagic.eterna.dao.ResultIterator resultItr)
根据ResultIterator创建结果对象。
|
QueryResult(Class<T> type,
self.micromagic.eterna.dao.ResultIterator resultItr,
self.micromagic.util.converter.ValueConverter specialConverter)
根据ResultIterator及转换器创建结果对象。
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
add(int index,
T element) |
boolean |
add(T e) |
boolean |
addAll(Collection<? extends T> c) |
boolean |
addAll(int index,
Collection<? extends T> c) |
<V> QueryResult<V> |
changeType(Class<V> type)
切换结果的类型。
|
void |
clear() |
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> c) |
T |
get(int index)
已过时。
请使用迭代器(iterator)获取数据
|
Object |
getExtParam(String name)
获取扩展参数。
|
Map<String,Object> |
getExtParams()
获取所有的扩展参数。
|
T |
getFirst()
获取结果中的第一条记录。
|
int |
getPageNum()
获取页码。
|
int |
getPageSize()
获取分页大小。
|
int |
getTotalCount()
获取总记录数。
|
int |
getTotalPage()
获取总页数。
|
boolean |
hasMoreRecord()
判断实际结果集中是否还有更多的记录。
|
int |
indexOf(Object o) |
boolean |
isEmpty() |
boolean |
isTotalCountAvailable()
判断总记录数是否有效。
|
static boolean |
isValidType(Class<?> type)
判断给出的行类型是否合法。
|
Iterator<T> |
iterator() |
int |
lastIndexOf(Object o) |
ListIterator<T> |
listIterator() |
ListIterator<T> |
listIterator(int index) |
void |
print(self.micromagic.eterna.model.AppDataLogExecute.Printer p,
org.dom4j.Element parent,
Object value) |
void |
readExternal(ObjectInput in) |
T |
remove(int index) |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
boolean |
retainAll(Collection<?> c) |
T |
set(int index,
T element) |
void |
setPageNum(int num)
设置页码。
|
void |
setPageSize(int size)
设置分页大小。
|
void |
setTotalCount(int count)
设置总记录数。
|
int |
size() |
void |
storeAll(int maxCount)
如果是获取所有数据的话,可以调用此方法将数据保存下来。
|
List<T> |
subList(int fromIndex,
int toIndex) |
Object[] |
toArray() |
<E> E[] |
toArray(E[] a) |
void |
writeExternal(ObjectOutput out) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitequals, hashCode, replaceAll, sort, spliteratorparallelStream, removeIf, streampublic static final int MAX_STORE_ITEM_COUNT
public QueryResult(Class<T> type, self.micromagic.eterna.dao.ResultIterator resultItr)
type - 类型resultItr - 结果public QueryResult(Class<T> type, self.micromagic.eterna.dao.ResultIterator resultItr, self.micromagic.util.converter.ValueConverter specialConverter)
type - 类型resultItr - 结果specialConverter - 特殊的类型转换器public QueryResult(Class<T> type, QueryResult<T> other, self.micromagic.util.converter.ValueConverter specialConverter)
type - 类型other - 结果specialConverter - 特殊的类型转换器public <V> QueryResult<V> changeType(Class<V> type)
V - 结果行的类型type - 行类型public void setTotalCount(int count)
count - 数量public int getTotalCount()
public boolean isTotalCountAvailable()
public boolean hasMoreRecord()
public int getPageNum()
public void setPageNum(int num)
num - 页数public int getPageSize()
public void setPageSize(int size)
size - 数量public int getTotalPage()
public T getFirst()
public boolean addAll(Collection<? extends T> c)
public boolean addAll(int index,
Collection<? extends T> c)
@Deprecated public T get(int index)
get 在接口中 List<T>iterator()public ListIterator<T> listIterator()
listIterator 在接口中 List<T>public ListIterator<T> listIterator(int index)
listIterator 在接口中 List<T>public boolean contains(Object o)
public boolean containsAll(Collection<?> c)
containsAll 在接口中 Collection<T>containsAll 在接口中 List<T>public boolean removeAll(Collection<?> c)
public boolean retainAll(Collection<?> c)
public int lastIndexOf(Object o)
lastIndexOf 在接口中 List<T>public void print(self.micromagic.eterna.model.AppDataLogExecute.Printer p,
org.dom4j.Element parent,
Object value)
throws Exception
print 在接口中 self.micromagic.eterna.model.AppDataLogExecute.BeanPrinterExceptionpublic void storeAll(int maxCount)
maxCount - 保存的最大元素个数可保存的最大值public void writeExternal(ObjectOutput out) throws IOException
writeExternal 在接口中 ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal 在接口中 ExternalizableIOExceptionClassNotFoundExceptionpublic static boolean isValidType(Class<?> type)
type - 类型Copyright © 2022. All rights reserved.