Top Description Fields Constructors Methods
com.mysql.cj.protocol.a.result

public Class ResultsetRowsStatic

extends AbstractResultsetRows
implements ResultsetRows
Class Inheritance
All Implemented Interfaces
com.mysql.cj.protocol.ResultsetRows, com.mysql.cj.protocol.ProtocolEntity, com.mysql.cj.result.RowList, java.util.Iterator
Imports
java.util.List, com.mysql.cj.protocol.ColumnDefinition, .ResultsetRows, com.mysql.cj.result.Row

Represents an in-memory result set

Field Summary

Modifier and TypeField and Description
private List<Row>
Inherited from com.mysql.cj.protocol.a.result.AbstractResultsetRows:
BEFORE_START_OF_ROWScurrentPositionInFetchedRowsmetadataownerrowFactorywasEmpty

Constructor Summary

AccessConstructor and Description
public
ResultsetRowsStatic(List<? extends Row>
list of Row instances
rows
,
ColumnDefinition
ColumnDefinition for this result set
columnDefinition
)

Creates a new RowDataStatic object.

Method Summary

Modifier and TypeMethod and Description
public void
addRow(Row
the row to add
row
)

Overrides default com.mysql.cj.protocol.ResultsetRows.addRow.

Adds a row.

public void
afterLast()

Overrides default com.mysql.cj.protocol.ResultsetRows.afterLast.

Moves to after last.

public void
beforeFirst()

Overrides default com.mysql.cj.protocol.ResultsetRows.beforeFirst.

Moves to before first.

public void
beforeLast()

Overrides default com.mysql.cj.protocol.ResultsetRows.beforeLast.

Moves to before last.

public Row
get(int
row number
atIndex
)

Overrides default com.mysql.cj.result.RowList.get.

Optionally retrieve Row at index n.

public int
getPosition()

Overrides default com.mysql.cj.result.RowList.getPosition.

Returns the current position.

public boolean
hasNext()

Implements java.util.Iterator.hasNext.

Returns true if the iteration has more elements.

public boolean
isAfterLast()

Implements com.mysql.cj.protocol.ResultsetRows.isAfterLast.

Returns true if we got the last element.

public boolean
isBeforeFirst()

Implements com.mysql.cj.protocol.ResultsetRows.isBeforeFirst.

Returns if iteration has not occured yet.

public boolean
isDynamic()

Overrides default com.mysql.cj.protocol.ResultsetRows.isDynamic.

Returns true if the result set is dynamic.

public boolean
isEmpty()

Overrides default com.mysql.cj.protocol.ResultsetRows.isEmpty.

Has no records.

public boolean
isFirst()

Overrides default com.mysql.cj.protocol.ResultsetRows.isFirst.

Are we on the first row of the result set?

public boolean
isLast()

Overrides default com.mysql.cj.protocol.ResultsetRows.isLast.

Are we on the last row of the result set?

public void
moveRowRelative(int
the relative number of rows to move
rowsToMove
)

Overrides default com.mysql.cj.protocol.ResultsetRows.moveRowRelative.

Moves the current position relative 'rows' from the current position.

public Row
next()

Implements java.util.Iterator.next.

Returns the next element in the iteration.

public void
remove()

Overrides default java.util.Iterator.remove.

Removes from the underlying collection the last element returned by this iterator (optional operation).

public void
setCurrentRow(int
row to move to
newIndex
)

Overrides default com.mysql.cj.protocol.ResultsetRows.setCurrentRow.

Moves the current position in the result set to the given row number.

public int
size()

Overrides default com.mysql.cj.result.RowList.size.

Only works on non dynamic row lists.

public boolean
Inherited from com.mysql.cj.protocol.a.result.AbstractResultsetRows:
getMetadatagetOwnersetMetadatasetOwner

Field Detail

rowsback to summary
private List<Row> rows

Constructor Detail

ResultsetRowsStaticback to summary
public ResultsetRowsStatic(List<? extends Row> rows, ColumnDefinition columnDefinition)

Creates a new RowDataStatic object.

Parameters
rows:List<? extends Row>

list of Row instances

columnDefinition:ColumnDefinition

ColumnDefinition for this result set

Annotations
@SuppressWarnings:unchecked

Method Detail

addRowback to summary
public void addRow(Row row)

Overrides default com.mysql.cj.protocol.ResultsetRows.addRow.

Doc from com.mysql.cj.protocol.ResultsetRows.addRow.

Adds a row.

Parameters
row:Row

the row to add

Annotations
@Override
afterLastback to summary
public void afterLast()

Overrides default com.mysql.cj.protocol.ResultsetRows.afterLast.

Doc from com.mysql.cj.protocol.ResultsetRows.afterLast.

Moves to after last.

Annotations
@Override
beforeFirstback to summary
public void beforeFirst()

Overrides default com.mysql.cj.protocol.ResultsetRows.beforeFirst.

Doc from com.mysql.cj.protocol.ResultsetRows.beforeFirst.

Moves to before first.

Annotations
@Override
beforeLastback to summary
public void beforeLast()

Overrides default com.mysql.cj.protocol.ResultsetRows.beforeLast.

Doc from com.mysql.cj.protocol.ResultsetRows.beforeLast.

Moves to before last.

Annotations
@Override
getback to summary
public Row get(int atIndex)

Overrides default com.mysql.cj.result.RowList.get.

Doc from com.mysql.cj.result.RowList.get.

Optionally retrieve Row at index n. Only works on non dynamic row lists.

Parameters
atIndex:int

row number

Returns:Row

Row

Annotations
@Override
getPositionback to summary
public int getPosition()

Overrides default com.mysql.cj.result.RowList.getPosition.

Doc from com.mysql.cj.result.RowList.getPosition.

Returns the current position.

Returns:int

the current row number

Annotations
@Override
hasNextback to summary
public boolean hasNext()

Implements java.util.Iterator.hasNext.

Doc from java.util.Iterator.hasNext.

Returns true if the iteration has more elements. (In other words, returns true if next would return an element rather than throwing an exception.)

Returns:boolean

true if the iteration has more elements

Annotations
@Override
isAfterLastback to summary
public boolean isAfterLast()

Implements com.mysql.cj.protocol.ResultsetRows.isAfterLast.

Doc from com.mysql.cj.protocol.ResultsetRows.isAfterLast.

Returns true if we got the last element.

Returns:boolean

true if after last row

Annotations
@Override
isBeforeFirstback to summary
public boolean isBeforeFirst()

Implements com.mysql.cj.protocol.ResultsetRows.isBeforeFirst.

Doc from com.mysql.cj.protocol.ResultsetRows.isBeforeFirst.

Returns if iteration has not occured yet.

Returns:boolean

true if before first row

Annotations
@Override
isDynamicback to summary
public boolean isDynamic()

Overrides default com.mysql.cj.protocol.ResultsetRows.isDynamic.

Doc from com.mysql.cj.protocol.ResultsetRows.isDynamic.

Returns 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.

Returns:boolean

true if this result set is streaming from the server

Annotations
@Override
isEmptyback to summary
public boolean isEmpty()

Overrides default com.mysql.cj.protocol.ResultsetRows.isEmpty.

Doc from com.mysql.cj.protocol.ResultsetRows.isEmpty.

Has no records.

Returns:boolean

true if no records

Annotations
@Override
isFirstback to summary
public boolean isFirst()

Overrides default com.mysql.cj.protocol.ResultsetRows.isFirst.

Doc from com.mysql.cj.protocol.ResultsetRows.isFirst.

Are we on the first row of the result set?

Returns:boolean

true if on first row

Annotations
@Override
isLastback to summary
public boolean isLast()

Overrides default com.mysql.cj.protocol.ResultsetRows.isLast.

Doc from com.mysql.cj.protocol.ResultsetRows.isLast.

Are we on the last row of the result set?

Returns:boolean

true if on last row

Annotations
@Override
moveRowRelativeback to summary
public void moveRowRelative(int rowsToMove)

Overrides default com.mysql.cj.protocol.ResultsetRows.moveRowRelative.

Doc from com.mysql.cj.protocol.ResultsetRows.moveRowRelative.

Moves the current position relative 'rows' from the current position.

Parameters
rowsToMove:int

the relative number of rows to move

Annotations
@Override
nextback to summary
public Row next()

Implements java.util.Iterator.next.

Doc from java.util.Iterator.next.

Returns the next element in the iteration.

Returns:Row

the next element in the iteration

Annotations
@Override
removeback to summary
public void remove()

Overrides default java.util.Iterator.remove.

Doc from java.util.Iterator.remove.

Removes from the underlying collection the last element returned by this iterator (optional operation). This method can be called only once per call to next.

The behavior of an iterator is unspecified if the underlying collection is modified while the iteration is in progress in any way other than by calling this method, unless an overriding class has specified a concurrent modification policy.

The behavior of an iterator is unspecified if this method is called after a call to the forEachRemaining method.

Annotations
@Override
setCurrentRowback to summary
public void setCurrentRow(int newIndex)

Overrides default com.mysql.cj.protocol.ResultsetRows.setCurrentRow.

Doc from com.mysql.cj.protocol.ResultsetRows.setCurrentRow.

Moves the current position in the result set to the given row number.

Parameters
newIndex:int

row to move to

Annotations
@Override
sizeback to summary
public int size()

Overrides default com.mysql.cj.result.RowList.size.

Doc from com.mysql.cj.result.RowList.size.

Only works on non dynamic row lists.

Returns:int

the size of this row list

Annotations
@Override
wasEmptyback to summary
public boolean wasEmpty()

Overrides com.mysql.cj.protocol.a.result.AbstractResultsetRows.wasEmpty.

Implements com.mysql.cj.protocol.ResultsetRows.wasEmpty.

Doc from com.mysql.cj.protocol.ResultsetRows.wasEmpty.

Did this result set have no rows?

Returns:boolean

true if the result set did not have rows

Annotations
@Override