public final class WindowDataReader extends Object implements DataReader
Constructor and Description |
---|
WindowDataReader(DataReader source,
WindowOptions windowOptions,
WindowDataReaderOptions readerOptions)
Initializes a new instance of the
WindowDataReader class. |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the reader and any associated resources, such as database connections or files.
|
boolean |
getBoolean(int columnIndex)
Gets a boolean value for the specified column.
|
int |
getColumnCount()
Gets the number of columns (fields) in the data.
|
int |
getColumnIndex(String columnName)
Gets the zero based column index for a column name.
|
String |
getColumnName(int columnIndex)
Gets the name of the column at the specified index.
|
Class |
getColumnType(int columnIndex)
Get the data type for the specified column.
|
double |
getDouble(int columnIndex)
Gets a double value for the specified column.
|
float |
getFloat(int columnIndex)
Gets a float value for the specified column.
|
int |
getInt(int columnIndex)
Gets an integer value for the specified column.
|
long |
getLong(int columnIndex)
Gets a long value for the specified column.
|
Object |
getObject(int columnIndex)
Gets an Object representation for the value at the specified column.
|
String |
getString(int columnIndex)
Gets a string value for the specified column.
|
boolean |
isNull(int columnIndex)
Determines whether the value is null (missing) for the specified column.
|
boolean |
read()
Moves to the next record, if any exist.
|
public WindowDataReader(DataReader source, WindowOptions windowOptions, WindowDataReaderOptions readerOptions)
WindowDataReader
class.source
- The source data to window over.windowOptions
- Options for the windows to create.readerOptions
- Options for the window reader, such as a derived column names.public boolean read()
read
in interface DataReader
true
if the reader successfully moved to a new record, or false
if no more records are present.public int getColumnCount()
getColumnCount
in interface DataRecord
public void close()
close
in interface DataReader
close
in interface Closeable
close
in interface AutoCloseable
public String getColumnName(int columnIndex)
getColumnName
in interface DataRecord
columnIndex
- The zero based index of the column.public Class getColumnType(int columnIndex)
getColumnType
in interface DataRecord
public Object getObject(int columnIndex)
getObject
in interface DataRecord
public int getColumnIndex(String columnName)
getColumnIndex
in interface DataRecord
columnName
- The name of the column.public boolean getBoolean(int columnIndex)
getBoolean
in interface DataRecord
columnIndex
- The zero based column index.public int getInt(int columnIndex)
getInt
in interface DataRecord
columnIndex
- The zero based column index.public long getLong(int columnIndex)
getLong
in interface DataRecord
columnIndex
- The zero based column index.public float getFloat(int columnIndex)
getFloat
in interface DataRecord
columnIndex
- The zero based column index.public double getDouble(int columnIndex)
getDouble
in interface DataRecord
columnIndex
- The zero based column index.public String getString(int columnIndex)
getString
in interface DataRecord
public boolean isNull(int columnIndex)
isNull
in interface DataRecord
true
if the value is null (missing), false
otherwise.Copyright © 2023. All rights reserved.