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
Modifier and TypeMethodDescriptiongetBigDecimalValue
(int p_iIdx) Get a decimal number value.getBigDecimalValue
(int p_iIdx, BigDecimal p_valueIfNull) Get a decimal number value.getBooleanValue
(int p_iIdx) Get a boolean value.getBooleanValue
(int p_iIdx, Boolean p_valueIfNull) Get a boolean value.byte
getByteValue
(int p_iIdx) Get a byte value.getByteValue
(int p_iIdx, Byte p_valueIfNull) Get a byte value.getDateValue
(int p_iIdx) Get a date value.getDateValue
(int p_iIdx, Date p_valueIfNull) Get a date value.getDoubleValue
(int p_iIdx) Get a double value.getDoubleValue
(int p_iIdx, Double p_valueIfNull) Get a double precision float value.getFloatValue
(int p_iIdx) Get a single precision float value.getFloatValue
(int p_iIdx, Float p_valueIfNull) Get a single precision float value.getIntValue
(int p_iIdx) Get an integer value.getIntValue
(int p_iIdx, Integer p_valueIfNull) Get an integer value.getLongValue
(int p_iIdx) Get a long value.getLongValue
(int p_iIdx, Long p_valueIfNull) Get a long value.getShortValue
(int p_iIdx) Get a short value.getShortValue
(int p_iIdx, Short p_valueIfNull) Get a short value.getStringValue
(int p_iIdx) Get a string value.getStringValue
(int p_iIdx, String p_valueIfNull) Get a string value.getTimestampValue
(int p_iIdx) Get a timestamp value.getTimestampValue
(int p_iIdx, Timestamp p_valueIfNull) Get a timestamp value.getTimeValue
(int p_iIdx) Get a time value.getTimeValue
(int p_iIdx, Date p_valueIfNull) Get a time value.getValue
(int p_iIdx) Get a value.Get a value.boolean
wasNull
(int p_iIdx) Check if the value in the given column wasnull
.
-
Method Details
-
wasNull
Check if the value in the given column wasnull
.- Parameters:
p_iIdx
- The 1-based column index.- Returns:
true
if the value wasnull
, orfalse
otherwise.- Throws:
SQLException
- If a database error occurred.
-
getBooleanValue
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
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
Get 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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.
-