Package de.uplanet.lucy.server.util.db
Interface IValueAccess
-
- All Known Subinterfaces:
IDbResultSet,IDbRow
- All Known Implementing Classes:
DbDisconnectedRow,DbResultSet
public interface IValueAccess
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BigDecimalgetBigDecimalValue(int p_iIdx)Get a decimal number value.BigDecimalgetBigDecimalValue(int p_iIdx, BigDecimal p_valueIfNull)Get a decimal number value.BooleangetBooleanValue(int p_iIdx)Get a boolean value.BooleangetBooleanValue(int p_iIdx, Boolean p_valueIfNull)Get a boolean value.bytegetByteValue(int p_iIdx)Get a byte value.BytegetByteValue(int p_iIdx, Byte p_valueIfNull)Get a byte value.DategetDateValue(int p_iIdx)Get a date value.DategetDateValue(int p_iIdx, Date p_valueIfNull)Get a date value.DoublegetDoubleValue(int p_iIdx)Get a double value.DoublegetDoubleValue(int p_iIdx, Double p_valueIfNull)Get a double precision float value.FloatgetFloatValue(int p_iIdx)Get a single precision float value.FloatgetFloatValue(int p_iIdx, Float p_valueIfNull)Get a single precision float value.IntegergetIntValue(int p_iIdx)Get an integer value.IntegergetIntValue(int p_iIdx, Integer p_valueIfNull)Get an integer value.LonggetLongValue(int p_iIdx)Get a long value.LonggetLongValue(int p_iIdx, Long p_valueIfNull)Get a long value.ShortgetShortValue(int p_iIdx)Get a short value.ShortgetShortValue(int p_iIdx, Short p_valueIfNull)Get a short value.StringgetStringValue(int p_iIdx)Get a string value.StringgetStringValue(int p_iIdx, String p_valueIfNull)Get a string value.TimestampgetTimestampValue(int p_iIdx)Get a timestamp value.TimestampgetTimestampValue(int p_iIdx, Timestamp p_valueIfNull)Get a timestamp value.DategetTimeValue(int p_iIdx)Get a time value.DategetTimeValue(int p_iIdx, Date p_valueIfNull)Get a time value.ObjectgetValue(int p_iIdx)Get a value.ObjectgetValue(int p_iIdx, Object p_valueIfNull)Get a value.booleanwasNull(int p_iIdx)Check if the value in the given column wasnull.
-
-
-
Method Detail
-
wasNull
boolean wasNull(int p_iIdx) throws SQLExceptionCheck if the value in the given column wasnull.- Parameters:
p_iIdx- The 1-based column index.- Returns:
trueif the value wasnull, orfalseotherwise.- Throws:
SQLException- If a database error occurred.
-
getBooleanValue
Boolean getBooleanValue(int p_iIdx) throws SQLException, ValueCastException
Get a boolean value.- Parameters:
p_iIdx- The 1-based column index.- Returns:
- A boolean value, or
null. - Throws:
ValueCastException- If the database value could not be cast to boolean.SQLException- If a database error occurred.
-
getBooleanValue
Boolean getBooleanValue(int p_iIdx, Boolean p_valueIfNull) throws SQLException, ValueCastException
Get a boolean value.- Parameters:
p_iIdx- The 1-based column index.p_valueIfNull- The value to be returned if the database value wasNULL.- Returns:
- A boolean value, or
p_valueIfNull. - Throws:
ValueCastException- If the database value could not be cast to boolean.SQLException- If a database error occurred.
-
getByteValue
byte getByteValue(int p_iIdx) throws SQLException, ValueCastExceptionGet a byte value.- Parameters:
p_iIdx- The 1-based column index.- Returns:
- A byte value, or
null. - Throws:
ValueCastException- If the database value could not be cast to byte.SQLException- If a database error occurred.
-
getByteValue
Byte getByteValue(int p_iIdx, Byte p_valueIfNull) throws SQLException, ValueCastException
Get a byte value.- Parameters:
p_iIdx- The 1-based column index.p_valueIfNull- The value to be returned if the database value wasNULL.- Returns:
- A byte value, or
p_valueIfNull. - Throws:
ValueCastException- If the database value could not be cast to byte.SQLException- If a database error occurred.
-
getShortValue
Short getShortValue(int p_iIdx) throws SQLException, ValueCastException
Get a short value.- Parameters:
p_iIdx- The 1-based column index.- Returns:
- A short value, or
null. - Throws:
ValueCastException- If the database value could not be cast to short.SQLException- If a database error occurred.
-
getShortValue
Short getShortValue(int p_iIdx, Short p_valueIfNull) throws SQLException, ValueCastException
Get a short value.- Parameters:
p_iIdx- The 1-based column index.p_valueIfNull- The value to be returned if the database value wasNULL.- Returns:
- A short value, or
p_valueIfNull. - Throws:
ValueCastException- If the database value could not be cast to short.SQLException- If a database error occurred.
-
getIntValue
Integer getIntValue(int p_iIdx) throws SQLException, ValueCastException
Get an integer value.- Parameters:
p_iIdx- The 1-based column index.- Returns:
- An integer value, or
null. - Throws:
ValueCastException- If the database value could not be cast to integer.SQLException- If a database error occurred.
-
getIntValue
Integer getIntValue(int p_iIdx, Integer p_valueIfNull) throws SQLException, ValueCastException
Get an integer value.- Parameters:
p_iIdx- The 1-based column index.p_valueIfNull- The value to be returned if the database value wasNULL.- Returns:
- An integer value, or
p_valueIfNull. - Throws:
ValueCastException- If the database value could not be cast to integer.SQLException- If a database error occurred.
-
getLongValue
Long getLongValue(int p_iIdx) throws SQLException, ValueCastException
Get a long value.- Parameters:
p_iIdx- The 1-based column index.- Returns:
- A long value, or
null. - Throws:
ValueCastException- If the database value could not be cast to long.SQLException- If a database error occurred.
-
getLongValue
Long getLongValue(int p_iIdx, Long p_valueIfNull) throws SQLException, ValueCastException
Get a long value.- Parameters:
p_iIdx- The 1-based column index.p_valueIfNull- The value to be returned if the database value wasNULL.- Returns:
- A long value, or
p_valueIfNull. - Throws:
ValueCastException- If the database value could not be cast to long.SQLException- If a database error occurred.
-
getFloatValue
Float getFloatValue(int p_iIdx) throws SQLException, ValueCastException
Get a single precision float value.- Parameters:
p_iIdx- The 1-based column index.- Returns:
- A float value, or
null. - Throws:
ValueCastException- If the database value could not be cast to float.SQLException- If a database error occurred.
-
getFloatValue
Float getFloatValue(int p_iIdx, Float p_valueIfNull) throws SQLException, ValueCastException
Get a single precision float value.- Parameters:
p_iIdx- The 1-based column index.p_valueIfNull- The value to be returned if the database value wasNULL.- Returns:
- A float value, or
p_valueIfNull. - Throws:
ValueCastException- If the database value could not be cast to float.SQLException- If a database error occurred.
-
getDoubleValue
Double getDoubleValue(int p_iIdx) throws SQLException, ValueCastException
Get a double value.- Parameters:
p_iIdx- The 1-based column index.- Returns:
- A double value, or
null. - Throws:
ValueCastException- If the database value could not be cast to double.SQLException- If a database error occurred.
-
getDoubleValue
Double getDoubleValue(int p_iIdx, Double p_valueIfNull) throws SQLException, ValueCastException
Get a double precision float value.- Parameters:
p_iIdx- The 1-based column index.p_valueIfNull- The value to be returned if the database value wasNULL.- Returns:
- A double value, or
p_valueIfNull. - Throws:
ValueCastException- If the database value could not be cast to double.SQLException- If a database error occurred.
-
getBigDecimalValue
BigDecimal getBigDecimalValue(int p_iIdx) throws SQLException, ValueCastException
Get a decimal number value.- Parameters:
p_iIdx- The 1-based column index.- Returns:
- A BigDecimal value, or
null. - Throws:
ValueCastException- If the database value could not be cast to BigDecimal.SQLException- If a database error occurred.
-
getBigDecimalValue
BigDecimal getBigDecimalValue(int p_iIdx, BigDecimal p_valueIfNull) throws SQLException, ValueCastException
Get a decimal number value.- Parameters:
p_iIdx- The 1-based column index.p_valueIfNull- The value to be returned if the database value wasNULL.- Returns:
- A BigDecimal value, or
p_valueIfNull. - Throws:
ValueCastException- If the database value could not be cast to BigDecimal.SQLException- If a database error occurred.
-
getStringValue
String getStringValue(int p_iIdx) throws SQLException, ValueCastException
Get a string value.- Parameters:
p_iIdx- The 1-based column index.- Returns:
- A string value, or
null. - Throws:
ValueCastException- If the database value could not be cast to a string.SQLException- If a database error occurred.
-
getStringValue
String getStringValue(int p_iIdx, String p_valueIfNull) throws SQLException, ValueCastException
Get a string value.- Parameters:
p_iIdx- The 1-based column index.p_valueIfNull- The value to be returned if the database value wasNULL.- Returns:
- A string value, or
p_valueIfNull. - Throws:
ValueCastException- If the database value could not be cast to string.SQLException- If a database error occurred.
-
getTimestampValue
Timestamp getTimestampValue(int p_iIdx) throws SQLException, ValueCastException
Get a timestamp value.- Parameters:
p_iIdx- The 1-based column index.- Returns:
- A timestamp value, or
null. - Throws:
ValueCastException- If the database value could not be cast to a timestamp.SQLException- If a database error occurred.
-
getTimestampValue
Timestamp getTimestampValue(int p_iIdx, Timestamp p_valueIfNull) throws SQLException, ValueCastException
Get a timestamp value.- Parameters:
p_iIdx- The 1-based column index.p_valueIfNull- The value to be returned if the database value wasNULL.- Returns:
- A timestamp value, or
p_valueIfNull. - Throws:
ValueCastException- If the database value could not be cast to timestamp.SQLException- If a database error occurred.
-
getDateValue
Date getDateValue(int p_iIdx) throws SQLException, ValueCastException
Get a date value.- Parameters:
p_iIdx- The 1-based column index.- Returns:
- A date value, or
null. - Throws:
ValueCastException- If the database value could not be cast to date.SQLException- If a database error occurred.
-
getDateValue
Date getDateValue(int p_iIdx, Date p_valueIfNull) throws SQLException, ValueCastException
Get a date value.- Parameters:
p_iIdx- The 1-based column index.p_valueIfNull- The value to be returned if the database value wasNULL.- Returns:
- A date value, or
p_valueIfNull. - Throws:
ValueCastException- If the database value could not be cast to date.SQLException- If a database error occurred.
-
getTimeValue
Date getTimeValue(int p_iIdx) throws SQLException, ValueCastException
Get a time value.- Parameters:
p_iIdx- The 1-based column index.- Returns:
- A time value, or
null. - Throws:
ValueCastException- If the database value could not be cast to time.SQLException- If a database error occurred.
-
getTimeValue
Date getTimeValue(int p_iIdx, Date p_valueIfNull) throws SQLException, ValueCastException
Get a time value.- Parameters:
p_iIdx- The 1-based column index.p_valueIfNull- The value to be returned if the database value wasNULL.- Returns:
- A time value, or
p_valueIfNull. - Throws:
ValueCastException- If the database value could not be cast to time.SQLException- If a database error occurred.
-
getValue
Object getValue(int p_iIdx) throws SQLException
Get a value. Note: The use of this method is discouraged. Use a method that returns a specified type instead.- Parameters:
p_iIdx- The 1-based column index.- Returns:
- The value.
- Throws:
SQLException- If a database error occurred.
-
getValue
Object getValue(int p_iIdx, Object p_valueIfNull) throws SQLException
Get a value. Note: The use of this method is discouraged. Use a method that returns a specified type instead.- Parameters:
p_iIdx- The 1-based column index.p_valueIfNull- The value to be returned if the database value wasNULL.- Returns:
- The value, or
p_valueIfNull. - Throws:
SQLException- If a database error occurred.
-
-