类 ResultsetRowsStatic
- java.lang.Object
-
- com.mysql.cj.protocol.a.result.AbstractResultsetRows
-
- com.mysql.cj.protocol.a.result.ResultsetRowsStatic
-
- 所有已实现的接口:
ProtocolEntity,ResultsetRows,RowList,Iterator<Row>
public class ResultsetRowsStatic extends AbstractResultsetRows implements ResultsetRows
Represents an in-memory result set
-
-
字段概要
-
从类继承的字段 com.mysql.cj.protocol.a.result.AbstractResultsetRows
BEFORE_START_OF_ROWS, currentPositionInFetchedRows, metadata, owner, rowFactory, wasEmpty
-
从接口继承的字段 com.mysql.cj.result.RowList
RESULT_SET_SIZE_UNKNOWN
-
-
构造器概要
构造器 构造器 说明 ResultsetRowsStatic(List<? extends Row> rows, ColumnDefinition columnDefinition)Creates a new RowDataStatic object.
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidaddRow(Row row)Adds a row.voidafterLast()Moves to after last.voidbeforeFirst()Moves to before first.voidbeforeLast()Moves to before last.Rowget(int atIndex)Optionally retrieve Row at index n.intgetPosition()Returns the current position.booleanhasNext()booleanisAfterLast()Returns true if we got the last element.booleanisBeforeFirst()Returns if iteration has not occured yet.booleanisDynamic()Returns true if the result set is dynamic.booleanisEmpty()Has no records.booleanisFirst()Are we on the first row of the result set?booleanisLast()Are we on the last row of the result set?voidmoveRowRelative(int rowsToMove)Moves the current position relative 'rows' from the current position.Rownext()voidremove()voidsetCurrentRow(int newIndex)Moves the current position in the result set to the given row number.intsize()Only works on non dynamic row lists.booleanwasEmpty()Did this result set have no rows?-
从类继承的方法 com.mysql.cj.protocol.a.result.AbstractResultsetRows
getMetadata, getOwner, setMetadata, setOwner
-
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
从接口继承的方法 java.util.Iterator
forEachRemaining
-
从接口继承的方法 com.mysql.cj.protocol.ResultsetRows
close, getMetadata, getOwner, setMetadata, setOwner
-
-
-
-
构造器详细资料
-
ResultsetRowsStatic
public ResultsetRowsStatic(List<? extends Row> rows, ColumnDefinition columnDefinition)
Creates a new RowDataStatic object.- 参数:
rows- list ofRowinstancescolumnDefinition-ColumnDefinitionfor this result set
-
-
方法详细资料
-
addRow
public void addRow(Row row)
从接口复制的说明:ResultsetRowsAdds a row.- 指定者:
addRow在接口中ResultsetRows- 参数:
row- the row to add
-
afterLast
public void afterLast()
从接口复制的说明:ResultsetRowsMoves to after last.- 指定者:
afterLast在接口中ResultsetRows
-
beforeFirst
public void beforeFirst()
从接口复制的说明:ResultsetRowsMoves to before first.- 指定者:
beforeFirst在接口中ResultsetRows
-
beforeLast
public void beforeLast()
从接口复制的说明:ResultsetRowsMoves to before last.- 指定者:
beforeLast在接口中ResultsetRows
-
get
public Row get(int atIndex)
从接口复制的说明:RowListOptionally retrieve Row at index n. Only works on non dynamic row lists.
-
getPosition
public int getPosition()
从接口复制的说明:RowListReturns the current position.- 指定者:
getPosition在接口中RowList- 返回:
- the current row number
-
isAfterLast
public boolean isAfterLast()
从接口复制的说明:ResultsetRowsReturns true if we got the last element.- 指定者:
isAfterLast在接口中ResultsetRows- 返回:
- true if after last row
-
isBeforeFirst
public boolean isBeforeFirst()
从接口复制的说明:ResultsetRowsReturns if iteration has not occured yet.- 指定者:
isBeforeFirst在接口中ResultsetRows- 返回:
- true if before first row
-
isDynamic
public boolean isDynamic()
从接口复制的说明:ResultsetRowsReturns true if the result set is dynamic. This means that move back and move forward won't work because we do not hold on to the records.- 指定者:
isDynamic在接口中ResultsetRows- 返回:
- true if this result set is streaming from the server
-
isEmpty
public boolean isEmpty()
从接口复制的说明:ResultsetRowsHas no records.- 指定者:
isEmpty在接口中ResultsetRows- 返回:
- true if no records
-
isFirst
public boolean isFirst()
从接口复制的说明:ResultsetRowsAre we on the first row of the result set?- 指定者:
isFirst在接口中ResultsetRows- 返回:
- true if on first row
-
isLast
public boolean isLast()
从接口复制的说明:ResultsetRowsAre we on the last row of the result set?- 指定者:
isLast在接口中ResultsetRows- 返回:
- true if on last row
-
moveRowRelative
public void moveRowRelative(int rowsToMove)
从接口复制的说明:ResultsetRowsMoves the current position relative 'rows' from the current position.- 指定者:
moveRowRelative在接口中ResultsetRows- 参数:
rowsToMove- the relative number of rows to move
-
setCurrentRow
public void setCurrentRow(int newIndex)
从接口复制的说明:ResultsetRowsMoves the current position in the result set to the given row number.- 指定者:
setCurrentRow在接口中ResultsetRows- 参数:
newIndex- row to move to
-
size
public int size()
从接口复制的说明:RowListOnly works on non dynamic row lists.
-
wasEmpty
public boolean wasEmpty()
从接口复制的说明:ResultsetRowsDid this result set have no rows?- 指定者:
wasEmpty在接口中ResultsetRows- 覆盖:
wasEmpty在类中AbstractResultsetRows- 返回:
- true if the result set did not have rows
-
-