Top Description Fields Constructors Methods
org.h2.result

public Class ResultWithPaddedStrings

extends Object
implements ResultInterface
Class Inheritance
All Implemented Interfaces
org.h2.result.ResultInterface, java.lang.AutoCloseable
Imports
java.util.Arrays, org.h2.engine.Session, org.h2.util.MathUtils, org.h2.value.TypeInfo, .Value, .ValueVarchar

Result with padded fixed length strings.

Field Summary

Modifier and TypeField and Description
private final ResultInterface

Constructor Summary

AccessConstructor and Description
private
ResultWithPaddedStrings(ResultInterface
the source result
source
)

Creates new instance of result.

Method Summary

Modifier and TypeMethod and Description
public void
close()

Implements org.h2.result.ResultInterface.close.

Close the result and delete any temporary files

public ResultInterface
createShallowCopy(Session
the session of the copy
targetSession
)

Implements org.h2.result.ResultInterface.createShallowCopy.

Create a shallow copy of the result set.

public Value[]
currentRow()

Implements org.h2.result.ResultInterface.currentRow.

Get the current row.

public static ResultInterface

Returns:

wrapped result or original result
get
(ResultInterface
source result
source
)

Returns wrapped result if necessary, or original result if it does not contain visible CHAR columns.

public String
getAlias(int
the column number (starting with 0)
i
)

Implements org.h2.result.ResultInterface.getAlias.

Get the column alias name for the column.

public String
getColumnName(int
the column number (starting with 0)
i
)

Implements org.h2.result.ResultInterface.getColumnName.

Get the column name.

public TypeInfo
getColumnType(int
the column number (starting with 0)
i
)

Implements org.h2.result.ResultInterface.getColumnType.

Get the column data type.

public int
getFetchSize()

Implements org.h2.result.ResultInterface.getFetchSize.

Get the current fetch size for this result set.

public int
getNullable(int
the column number (starting with 0)
i
)

Implements org.h2.result.ResultInterface.getNullable.

Check if this column is nullable.

public long
getRowCount()

Implements org.h2.result.ResultInterface.getRowCount.

Get the number of rows in this object.

public long
getRowId()

Implements org.h2.result.ResultInterface.getRowId.

Get the current row id, starting with 0.

public String
getSchemaName(int
the column number (starting with 0)
i
)

Implements org.h2.result.ResultInterface.getSchemaName.

Get the schema name for the column, if one exists.

public String
getTableName(int
the column number (starting with 0)
i
)

Implements org.h2.result.ResultInterface.getTableName.

Get the table name for the column, if one exists.

public int
getVisibleColumnCount()

Implements org.h2.result.ResultInterface.getVisibleColumnCount.

Get the number of visible columns.

public boolean
hasNext()

Implements org.h2.result.ResultInterface.hasNext.

Check if this result has more rows to fetch.

public boolean
isAfterLast()

Implements org.h2.result.ResultInterface.isAfterLast.

Check if the current position is after last row.

public boolean
isClosed()

Implements org.h2.result.ResultInterface.isClosed.

Check if this result set is closed.

public boolean
isIdentity(int
the column number (starting with 0)
i
)

Implements org.h2.result.ResultInterface.isIdentity.

Check if this is an identity column.

public boolean
isLazy()

Implements org.h2.result.ResultInterface.isLazy.

Check if this a lazy execution result.

public boolean
needToClose()

Implements org.h2.result.ResultInterface.needToClose.

Check if this result set should be closed, for example because it is buffered using a temporary file.

public boolean
next()

Implements org.h2.result.ResultInterface.next.

Go to the next row.

public void
reset()

Implements org.h2.result.ResultInterface.reset.

Go to the beginning of the result, that means before the first row.

private static String
rightPadWithSpaces(String s, int length)

public void
setFetchSize(int
the new fetch size
fetchSize
)

Implements org.h2.result.ResultInterface.setFetchSize.

Set the fetch size for this result set.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

sourceback to summary
private final ResultInterface source

Constructor Detail

ResultWithPaddedStringsback to summary
private ResultWithPaddedStrings(ResultInterface source)

Creates new instance of result.

Parameters
source:ResultInterface

the source result

Method Detail

closeback to summary
public void close()

Implements org.h2.result.ResultInterface.close.

Doc from org.h2.result.ResultInterface.close.

Close the result and delete any temporary files

Annotations
@Override
createShallowCopyback to summary
public ResultInterface createShallowCopy(Session targetSession)

Implements org.h2.result.ResultInterface.createShallowCopy.

Doc from org.h2.result.ResultInterface.createShallowCopy.

Create a shallow copy of the result set. The data and a temporary table (if there is any) is not copied.

Parameters
targetSession:Session

the session of the copy

Returns:ResultInterface

the copy if possible, or null if copying is not possible

Annotations
@Override
currentRowback to summary
public Value[] currentRow()

Implements org.h2.result.ResultInterface.currentRow.

Doc from org.h2.result.ResultInterface.currentRow.

Get the current row.

Returns:Value[]

the row

Annotations
@Override
getback to summary
public static ResultInterface get(ResultInterface source)

Returns wrapped result if necessary, or original result if it does not contain visible CHAR columns.

Parameters
source:ResultInterface

source result

Returns:ResultInterface

wrapped result or original result

getAliasback to summary
public String getAlias(int i)

Implements org.h2.result.ResultInterface.getAlias.

Doc from org.h2.result.ResultInterface.getAlias.

Get the column alias name for the column.

Parameters
i:int

the column number (starting with 0)

Returns:String

the alias name

Annotations
@Override
getColumnNameback to summary
public String getColumnName(int i)

Implements org.h2.result.ResultInterface.getColumnName.

Doc from org.h2.result.ResultInterface.getColumnName.

Get the column name.

Parameters
i:int

the column number (starting with 0)

Returns:String

the column name

Annotations
@Override
getColumnTypeback to summary
public TypeInfo getColumnType(int i)

Implements org.h2.result.ResultInterface.getColumnType.

Doc from org.h2.result.ResultInterface.getColumnType.

Get the column data type.

Parameters
i:int

the column number (starting with 0)

Returns:TypeInfo

the column data type

Annotations
@Override
getFetchSizeback to summary
public int getFetchSize()

Implements org.h2.result.ResultInterface.getFetchSize.

Doc from org.h2.result.ResultInterface.getFetchSize.

Get the current fetch size for this result set.

Returns:int

the fetch size

Annotations
@Override
getNullableback to summary
public int getNullable(int i)

Implements org.h2.result.ResultInterface.getNullable.

Doc from org.h2.result.ResultInterface.getNullable.

Check if this column is nullable.

Parameters
i:int

the column number (starting with 0)

Returns:int

Column.NULLABLE_*

Annotations
@Override
getRowCountback to summary
public long getRowCount()

Implements org.h2.result.ResultInterface.getRowCount.

Doc from org.h2.result.ResultInterface.getRowCount.

Get the number of rows in this object.

Returns:long

the number of rows

Annotations
@Override
getRowIdback to summary
public long getRowId()

Implements org.h2.result.ResultInterface.getRowId.

Doc from org.h2.result.ResultInterface.getRowId.

Get the current row id, starting with 0. -1 is returned when next() was not called yet.

Returns:long

the row id

Annotations
@Override
getSchemaNameback to summary
public String getSchemaName(int i)

Implements org.h2.result.ResultInterface.getSchemaName.

Doc from org.h2.result.ResultInterface.getSchemaName.

Get the schema name for the column, if one exists.

Parameters
i:int

the column number (starting with 0)

Returns:String

the schema name or null

Annotations
@Override
getTableNameback to summary
public String getTableName(int i)

Implements org.h2.result.ResultInterface.getTableName.

Doc from org.h2.result.ResultInterface.getTableName.

Get the table name for the column, if one exists.

Parameters
i:int

the column number (starting with 0)

Returns:String

the table name or null

Annotations
@Override
getVisibleColumnCountback to summary
public int getVisibleColumnCount()

Implements org.h2.result.ResultInterface.getVisibleColumnCount.

Doc from org.h2.result.ResultInterface.getVisibleColumnCount.

Get the number of visible columns. More columns may exist internally for sorting or grouping.

Returns:int

the number of columns

Annotations
@Override
hasNextback to summary
public boolean hasNext()

Implements org.h2.result.ResultInterface.hasNext.

Doc from org.h2.result.ResultInterface.hasNext.

Check if this result has more rows to fetch.

Returns:boolean

true if it has

Annotations
@Override
isAfterLastback to summary
public boolean isAfterLast()

Implements org.h2.result.ResultInterface.isAfterLast.

Doc from org.h2.result.ResultInterface.isAfterLast.

Check if the current position is after last row.

Returns:boolean

true if after last

Annotations
@Override
isClosedback to summary
public boolean isClosed()

Implements org.h2.result.ResultInterface.isClosed.

Doc from org.h2.result.ResultInterface.isClosed.

Check if this result set is closed.

Returns:boolean

true if it is

Annotations
@Override
isIdentityback to summary
public boolean isIdentity(int i)

Implements org.h2.result.ResultInterface.isIdentity.

Doc from org.h2.result.ResultInterface.isIdentity.

Check if this is an identity column.

Parameters
i:int

the column number (starting with 0)

Returns:boolean

true for identity columns

Annotations
@Override
isLazyback to summary
public boolean isLazy()

Implements org.h2.result.ResultInterface.isLazy.

Doc from org.h2.result.ResultInterface.isLazy.

Check if this a lazy execution result.

Returns:boolean

true if it is a lazy result

Annotations
@Override
needToCloseback to summary
public boolean needToClose()

Implements org.h2.result.ResultInterface.needToClose.

Doc from org.h2.result.ResultInterface.needToClose.

Check if this result set should be closed, for example because it is buffered using a temporary file.

Returns:boolean

true if close should be called.

Annotations
@Override
nextback to summary
public boolean next()

Implements org.h2.result.ResultInterface.next.

Doc from org.h2.result.ResultInterface.next.

Go to the next row.

Returns:boolean

true if a row exists

Annotations
@Override
resetback to summary
public void reset()

Implements org.h2.result.ResultInterface.reset.

Doc from org.h2.result.ResultInterface.reset.

Go to the beginning of the result, that means before the first row.

Annotations
@Override
rightPadWithSpacesback to summary
private static String rightPadWithSpaces(String s, int length)
setFetchSizeback to summary
public void setFetchSize(int fetchSize)

Implements org.h2.result.ResultInterface.setFetchSize.

Doc from org.h2.result.ResultInterface.setFetchSize.

Set the fetch size for this result set.

Parameters
fetchSize:int

the new fetch size

Annotations
@Override