@NotThreadSafe public class DBResultRow extends Object implements com.helger.commons.lang.ICloneable<DBResultRow>, Serializable
| Modifier | Constructor and Description |
|---|---|
protected |
DBResultRow(DBResultRow aOther)
Copy constructor
|
|
DBResultRow(int nCols)
Create an empty result row with the specified number of colums.
|
| Modifier and Type | Method and Description |
|---|---|
DBResultField |
get(int nIndex)
Get the result field at the specified index
|
BigDecimal |
getAsBigDecimal(int nIndex) |
BigInteger |
getAsBigInteger(int nIndex) |
Blob |
getAsBlob(int nIndex) |
boolean |
getAsBoolean(int nIndex) |
boolean |
getAsBoolean(int nIndex,
boolean bDefault) |
Boolean |
getAsBooleanObj(int nIndex) |
byte |
getAsByte(int nIndex) |
byte |
getAsByte(int nIndex,
byte nDefault) |
byte[] |
getAsByteArray(int nIndex) |
Byte |
getAsByteObj(int nIndex) |
char |
getAsChar(int nIndex) |
char |
getAsChar(int nIndex,
char cDefault) |
Character |
getAsCharObj(int nIndex) |
Clob |
getAsClob(int nIndex) |
Date |
getAsDate(int nIndex) |
double |
getAsDouble(int nIndex) |
double |
getAsDouble(int nIndex,
double dDefault) |
Double |
getAsDoubleObj(int nIndex) |
float |
getAsFloat(int nIndex) |
float |
getAsFloat(int nIndex,
float fDefault) |
Float |
getAsFloatObj(int nIndex) |
int |
getAsInt(int nIndex) |
int |
getAsInt(int nIndex,
int nDefault) |
Integer |
getAsIntObj(int nIndex) |
LocalDate |
getAsLocalDate(int nIndex) |
LocalDateTime |
getAsLocalDateTime(int nIndex) |
LocalTime |
getAsLocalTime(int nIndex) |
long |
getAsLong(int nIndex) |
long |
getAsLong(int nIndex,
long nDefault) |
Long |
getAsLongObj(int nIndex) |
NClob |
getAsNClob(int nIndex) |
OffsetDateTime |
getAsOffsetDateTime(int nIndex) |
RowId |
getAsRowId(int nIndex) |
short |
getAsShort(int nIndex) |
short |
getAsShort(int nIndex,
short nDefault) |
Short |
getAsShortObj(int nIndex) |
String |
getAsString(int nIndex) |
Time |
getAsTime(int nIndex) |
Timestamp |
getAsTimestamp(int nIndex) |
DBResultRow |
getClone() |
int |
getColumnCount() |
String |
getColumnName(int nIndex)
Get the column name of the column at the specified index.
|
com.helger.commons.collection.impl.ICommonsMap<String,Integer> |
getColumnNameToIndexMap() |
int |
getColumnType(int nIndex)
Get the column type of the column at the specified index.
|
String |
getColumnTypeName(int nIndex)
Get the column type name of the column at the specified index.
|
int |
getUsedColumnIndex() |
Object |
getValue(int nIndex) |
protected void |
internalAdd(DBResultField aResultField)
Add a new result field in the the first free column.
|
protected void |
internalClear()
Set all columns to
null and restart the index at 0. |
String |
toString() |
protected DBResultRow(@Nonnull DBResultRow aOther)
aOther - other DB row to usepublic DBResultRow(@Nonnegative int nCols)
nCols - Number of columns. Must be be ≥ 0.protected void internalClear()
null and restart the index at 0. This is
mainly intended to resuse the same object in a loop.protected void internalAdd(@Nonnull DBResultField aResultField)
aResultField - The result field to add. May not be null.getUsedColumnIndex()@Nonnegative public int getUsedColumnIndex()
null.@Nonnegative public int getColumnCount()
@Nullable public DBResultField get(@Nonnegative int nIndex)
nIndex - The 0-based index to queryArrayIndexOutOfBoundsException - If the index is invalidpublic int getColumnType(@Nonnegative int nIndex)
nIndex - The 0-based index to queryTypes.ArrayIndexOutOfBoundsException - If the index is invalidNullPointerException - if the column at the specified index contains a null
value@Nullable public String getColumnTypeName(@Nonnegative int nIndex)
nIndex - The 0-based index to queryTypes.ArrayIndexOutOfBoundsException - If the index is invalidNullPointerException - if the column at the specified index contains a null
value@Nonnull @Nonempty public String getColumnName(@Nonnegative int nIndex)
nIndex - The 0-based index to querynull nor empty.ArrayIndexOutOfBoundsException - If the index is invalidNullPointerException - if the column at the specified index contains a null
value@Nullable public Object getValue(@Nonnegative int nIndex)
@Nullable public String getAsString(@Nonnegative int nIndex)
@Nullable public BigDecimal getAsBigDecimal(@Nonnegative int nIndex)
@Nullable public BigInteger getAsBigInteger(@Nonnegative int nIndex)
public boolean getAsBoolean(@Nonnegative int nIndex)
public boolean getAsBoolean(@Nonnegative int nIndex, boolean bDefault)
public byte getAsByte(@Nonnegative int nIndex)
public byte getAsByte(@Nonnegative int nIndex, byte nDefault)
@Nullable public byte[] getAsByteArray(@Nonnegative int nIndex)
public char getAsChar(@Nonnegative int nIndex)
public char getAsChar(@Nonnegative int nIndex, char cDefault)
public double getAsDouble(@Nonnegative int nIndex)
public double getAsDouble(@Nonnegative int nIndex, double dDefault)
public float getAsFloat(@Nonnegative int nIndex)
public float getAsFloat(@Nonnegative int nIndex, float fDefault)
public int getAsInt(@Nonnegative int nIndex)
public int getAsInt(@Nonnegative int nIndex, int nDefault)
public long getAsLong(@Nonnegative int nIndex)
public long getAsLong(@Nonnegative int nIndex, long nDefault)
public short getAsShort(@Nonnegative int nIndex)
public short getAsShort(@Nonnegative int nIndex, short nDefault)
@Nullable public Boolean getAsBooleanObj(@Nonnegative int nIndex)
@Nullable public Byte getAsByteObj(@Nonnegative int nIndex)
@Nullable public Character getAsCharObj(@Nonnegative int nIndex)
@Nullable public Double getAsDoubleObj(@Nonnegative int nIndex)
@Nullable public Float getAsFloatObj(@Nonnegative int nIndex)
@Nullable public Integer getAsIntObj(@Nonnegative int nIndex)
@Nullable public Long getAsLongObj(@Nonnegative int nIndex)
@Nullable public Short getAsShortObj(@Nonnegative int nIndex)
@Nullable public Blob getAsBlob(@Nonnegative int nIndex)
@Nullable public Clob getAsClob(@Nonnegative int nIndex)
@Nullable public Date getAsDate(@Nonnegative int nIndex)
@Nullable public LocalDate getAsLocalDate(@Nonnegative int nIndex)
@Nullable public NClob getAsNClob(@Nonnegative int nIndex)
@Nullable public RowId getAsRowId(@Nonnegative int nIndex)
@Nullable public Time getAsTime(@Nonnegative int nIndex)
@Nullable public LocalTime getAsLocalTime(@Nonnegative int nIndex)
@Nullable public Timestamp getAsTimestamp(@Nonnegative int nIndex)
@Nullable public LocalDateTime getAsLocalDateTime(@Nonnegative int nIndex)
@Nullable public OffsetDateTime getAsOffsetDateTime(@Nonnegative int nIndex)
@Nonnull @ReturnsMutableCopy public com.helger.commons.collection.impl.ICommonsMap<String,Integer> getColumnNameToIndexMap()
@Nonnull public DBResultRow getClone()
getClone in interface com.helger.commons.lang.ICloneable<DBResultRow>Copyright © 2014–2021 Philip Helger. All rights reserved.