public final class DataReaderFiltered extends Object implements DataReader
| Constructor and Description | 
|---|
DataReaderFiltered(DataReader inner,
                  DataReaderFilter filter)
Initializes a new instance of the  
DataReaderFiltered 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 DataReaderFiltered(DataReader inner, DataReaderFilter filter)
DataReaderFiltered class.inner - The existing data reader to filter.filter - Determines whether a record should be included in the filtered data reader or not.public boolean read()
read in interface DataReadertrue if the reader successfully moved to a new record, or false if no more records are present.public void close()
DataReaderclose in interface DataReaderclose in interface Closeableclose in interface AutoCloseablepublic int getColumnIndex(String columnName)
DataRecordgetColumnIndex in interface DataRecordcolumnName - The name of the column.public String getColumnName(int columnIndex)
DataRecordgetColumnName in interface DataRecordcolumnIndex - The zero based index of the column.public Class<?> getColumnType(int columnIndex)
DataRecordgetColumnType in interface DataRecordpublic int getColumnCount()
DataRecordgetColumnCount in interface DataRecordpublic boolean isNull(int columnIndex)
DataRecordisNull in interface DataRecordtrue if the value is null (missing), false otherwise.public Object getObject(int columnIndex)
DataRecordgetObject in interface DataRecordpublic String getString(int columnIndex)
DataRecordgetString in interface DataRecordpublic boolean getBoolean(int columnIndex)
DataRecordgetBoolean in interface DataRecordcolumnIndex - The zero based column index.public int getInt(int columnIndex)
DataRecordgetInt in interface DataRecordcolumnIndex - The zero based column index.public long getLong(int columnIndex)
DataRecordgetLong in interface DataRecordcolumnIndex - The zero based column index.public double getDouble(int columnIndex)
DataRecordgetDouble in interface DataRecordcolumnIndex - The zero based column index.public float getFloat(int columnIndex)
DataRecordgetFloat in interface DataRecordcolumnIndex - The zero based column index.Copyright © 2021. All rights reserved.