Package de.uplanet.lucy.server.util.db
Class DbRowList
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.ArrayList<IDbRow>
-
- de.uplanet.lucy.server.util.db.DbRowList
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<IDbRow>
,Collection<IDbRow>
,List<IDbRow>
,RandomAccess
public final class DbRowList extends ArrayList<IDbRow>
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<BigDecimal>
getBigDecimalColumn(int p_iIdx)
Get a column as a BigDecimal list.List<BigDecimal>
getBigDecimalColumn(int p_iIdx, BigDecimal p_valueIfNull)
Get a column as a BigDecimal list.List<Boolean>
getBooleanColumn(int p_iIdx)
Get a column as a Boolean list.List<Boolean>
getBooleanColumn(int p_iIdx, Boolean p_valueIfNull)
Get a column as a Boolean list.List<Byte>
getByteColumn(int p_iIdx)
Get a column as a Byte list.List<Byte>
getByteColumn(int p_iIdx, Byte p_valueIfNull)
Get a column as a Byte list.int
getColumnCount()
Get the numberof columns in this row list.List<Date>
getDateColumn(int p_iIdx)
Get a column as a Date list.List<Date>
getDateColumn(int p_iIdx, Date p_valueIfNull)
Get a column as a Date list.List<Double>
getDoubleColumn(int p_iIdx)
Get a column as a Double list.List<Double>
getDoubleColumn(int p_iIdx, Double p_valueIfNull)
Get a column as a Double list.List<Float>
getFloatColumn(int p_iIdx)
Get a column as a Float list.List<Float>
getFloatColumn(int p_iIdx, Float p_valueIfNull)
Get a column as a Float list.List<Integer>
getIntColumn(int p_iIdx)
Get a column as an Integer list.List<Integer>
getIntColumn(int p_iIdx, Integer p_valueIfNull)
Get a column as an Integer list.List<Long>
getLongColumn(int p_iIdx)
Get a column as a Long list.List<Long>
getLongColumn(int p_iIdx, Long p_valueIfNull)
Get a column as a Long list.int
getRowCount()
Get the numberof rows in this row list.List<Short>
getShortColumn(int p_iIdx)
Get a column as a Short list.List<Short>
getShortColumn(int p_iIdx, Short p_valueIfNull)
Get a column as a Short list.List<String>
getStringColumn(int p_iIdx)
Get a column as a String list.List<String>
getStringColumn(int p_iIdx, String p_valueIfNull)
Get a column as a String list.List<Date>
getTimeColumn(int p_iIdx)
Get a column as a Date list of times.List<Date>
getTimeColumn(int p_iIdx, Date p_valueIfNull)
Get a column as a Date list of times.List<Timestamp>
getTimestampColumn(int p_iIdx)
Get a column as a Timestamp list.List<Timestamp>
getTimestampColumn(int p_iIdx, Timestamp p_valueIfNull)
Get a column as a Timestamp list.-
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
-
Methods inherited from class java.util.AbstractCollection
containsAll, toString
-
Methods inherited from interface java.util.Collection
parallelStream, stream, toArray
-
Methods inherited from interface java.util.List
containsAll
-
-
-
-
Method Detail
-
getRowCount
public int getRowCount()
Get the numberof rows in this row list.- Returns:
- The number of rows in this row list.
-
getColumnCount
public int getColumnCount()
Get the numberof columns in this row list.- Returns:
- The number of columns, or
0
if this list does not contain any column.
-
getBigDecimalColumn
public List<BigDecimal> getBigDecimalColumn(int p_iIdx) throws SQLException, ValueCastException
Get a column as a BigDecimal list.- Parameters:
p_iIdx
- The 1-based column index.- Returns:
- The column as a list.
- Throws:
SQLException
- If a database error occurred.ValueCastException
- If the database value could not be cast to BigDecimal.
-
getBigDecimalColumn
public List<BigDecimal> getBigDecimalColumn(int p_iIdx, BigDecimal p_valueIfNull) throws SQLException, ValueCastException
Get a column as a BigDecimal list.- Parameters:
p_iIdx
- The 1-based column index.p_valueIfNull
- The value to be returned if the database value was NULL.- Returns:
- The column as a list.
- Throws:
SQLException
- If a database error occurred.ValueCastException
- If the database value could not be cast to BigDecimal.
-
getBooleanColumn
public List<Boolean> getBooleanColumn(int p_iIdx) throws SQLException, ValueCastException
Get a column as a Boolean list.- Parameters:
p_iIdx
- The 1-based column index.- Returns:
- The column as a list.
- Throws:
SQLException
- If a database error occurred.ValueCastException
- If the database value could not be cast to Boolean.
-
getBooleanColumn
public List<Boolean> getBooleanColumn(int p_iIdx, Boolean p_valueIfNull) throws SQLException, ValueCastException
Get a column as a Boolean list.- Parameters:
p_iIdx
- The 1-based column index.p_valueIfNull
- The value to be returned if the database value was NULL.- Returns:
- The column as a list.
- Throws:
SQLException
- If a database error occurred.ValueCastException
- If the database value could not be cast to Boolean.
-
getByteColumn
public List<Byte> getByteColumn(int p_iIdx) throws SQLException, ValueCastException
Get a column as a Byte list.- Parameters:
p_iIdx
- The 1-based column index.- Returns:
- The column as a list.
- Throws:
SQLException
- If a database error occurred.ValueCastException
- If the database value could not be cast to Byte.
-
getByteColumn
public List<Byte> getByteColumn(int p_iIdx, Byte p_valueIfNull) throws SQLException, ValueCastException
Get a column as a Byte list.- Parameters:
p_iIdx
- The 1-based column index.p_valueIfNull
- The value to be returned if the database value was NULL.- Returns:
- The column as a list.
- Throws:
SQLException
- If a database error occurred.ValueCastException
- If the database value could not be cast to Byte.
-
getDateColumn
public List<Date> getDateColumn(int p_iIdx) throws SQLException, ValueCastException
Get a column as a Date list.- Parameters:
p_iIdx
- The 1-based column index.- Returns:
- The column as a list.
- Throws:
SQLException
- If a database error occurred.ValueCastException
- If the database value could not be cast to Date.
-
getDateColumn
public List<Date> getDateColumn(int p_iIdx, Date p_valueIfNull) throws SQLException, ValueCastException
Get a column as a Date list.- Parameters:
p_iIdx
- The 1-based column index.p_valueIfNull
- The value to be returned if the database value was NULL.- Returns:
- The column as a list.
- Throws:
SQLException
- If a database error occurred.ValueCastException
- If the database value could not be cast to Date.
-
getDoubleColumn
public List<Double> getDoubleColumn(int p_iIdx) throws SQLException, ValueCastException
Get a column as a Double list.- Parameters:
p_iIdx
- The 1-based column index.- Returns:
- The column as a list.
- Throws:
SQLException
- If a database error occurred.ValueCastException
- If the database value could not be cast to Double.
-
getDoubleColumn
public List<Double> getDoubleColumn(int p_iIdx, Double p_valueIfNull) throws SQLException, ValueCastException
Get a column as a Double list.- Parameters:
p_iIdx
- The 1-based column index.p_valueIfNull
- The value to be returned if the database value was NULL.- Returns:
- The column as a list.
- Throws:
SQLException
- If a database error occurred.ValueCastException
- If the database value could not be cast to Double.
-
getFloatColumn
public List<Float> getFloatColumn(int p_iIdx) throws SQLException, ValueCastException
Get a column as a Float list.- Parameters:
p_iIdx
- The 1-based column index.- Returns:
- The column as a list.
- Throws:
SQLException
- If a database error occurred.ValueCastException
- If the database value could not be cast to Float.
-
getFloatColumn
public List<Float> getFloatColumn(int p_iIdx, Float p_valueIfNull) throws SQLException, ValueCastException
Get a column as a Float list.- Parameters:
p_iIdx
- The 1-based column index.p_valueIfNull
- The value to be returned if the database value was NULL.- Returns:
- The column as a list.
- Throws:
SQLException
- If a database error occurred.ValueCastException
- If the database value could not be cast to Float.
-
getIntColumn
public List<Integer> getIntColumn(int p_iIdx) throws SQLException, ValueCastException
Get a column as an Integer list.- Parameters:
p_iIdx
- The 1-based column index.- Returns:
- The column as a list.
- Throws:
SQLException
- If a database error occurred.ValueCastException
- If the database value could not be cast to Integer.
-
getIntColumn
public List<Integer> getIntColumn(int p_iIdx, Integer p_valueIfNull) throws SQLException, ValueCastException
Get a column as an Integer list.- Parameters:
p_iIdx
- The 1-based column index.p_valueIfNull
- The value to be returned if the database value was NULL.- Returns:
- The column as a list.
- Throws:
SQLException
- If a database error occurred.ValueCastException
- If the database value could not be cast to Integer.
-
getLongColumn
public List<Long> getLongColumn(int p_iIdx) throws SQLException, ValueCastException
Get a column as a Long list.- Parameters:
p_iIdx
- The 1-based column index.- Returns:
- The column as a list.
- Throws:
SQLException
- If a database error occurred.ValueCastException
- If the database value could not be cast to Long.
-
getLongColumn
public List<Long> getLongColumn(int p_iIdx, Long p_valueIfNull) throws SQLException, ValueCastException
Get a column as a Long list.- Parameters:
p_iIdx
- The 1-based column index.p_valueIfNull
- The value to be returned if the database value was NULL.- Returns:
- The column as a list.
- Throws:
SQLException
- If a database error occurred.ValueCastException
- If the database value could not be cast to Long.
-
getShortColumn
public List<Short> getShortColumn(int p_iIdx) throws SQLException, ValueCastException
Get a column as a Short list.- Parameters:
p_iIdx
- The 1-based column index.- Returns:
- The column as a list.
- Throws:
SQLException
- If a database error occurred.ValueCastException
- If the database value could not be cast to Short.
-
getShortColumn
public List<Short> getShortColumn(int p_iIdx, Short p_valueIfNull) throws SQLException, ValueCastException
Get a column as a Short list.- Parameters:
p_iIdx
- The 1-based column index.p_valueIfNull
- The value to be returned if the database value was NULL.- Returns:
- The column as a list.
- Throws:
SQLException
- If a database error occurred.ValueCastException
- If the database value could not be cast to Short.
-
getStringColumn
public List<String> getStringColumn(int p_iIdx) throws SQLException, ValueCastException
Get a column as a String list.- Parameters:
p_iIdx
- The 1-based column index.- Returns:
- The column as a list.
- Throws:
SQLException
- If a database error occurred.ValueCastException
- If the database value could not be cast to String.
-
getStringColumn
public List<String> getStringColumn(int p_iIdx, String p_valueIfNull) throws SQLException, ValueCastException
Get a column as a String list.- Parameters:
p_iIdx
- The 1-based column index.p_valueIfNull
- The value to be returned if the database value was NULL.- Returns:
- The column as a list.
- Throws:
SQLException
- If a database error occurred.ValueCastException
- If the database value could not be cast to String.
-
getTimestampColumn
public List<Timestamp> getTimestampColumn(int p_iIdx) throws SQLException, ValueCastException
Get a column as a Timestamp list.- Parameters:
p_iIdx
- The 1-based column index.- Returns:
- The column as a list.
- Throws:
SQLException
- If a database error occurred.ValueCastException
- If the database value could not be cast to Timestamp.
-
getTimestampColumn
public List<Timestamp> getTimestampColumn(int p_iIdx, Timestamp p_valueIfNull) throws SQLException, ValueCastException
Get a column as a Timestamp list.- Parameters:
p_iIdx
- The 1-based column index.p_valueIfNull
- The value to be returned if the database value was NULL.- Returns:
- The column as a list.
- Throws:
SQLException
- If a database error occurred.ValueCastException
- If the database value could not be cast to Timestamp.
-
getTimeColumn
public List<Date> getTimeColumn(int p_iIdx) throws SQLException, ValueCastException
Get a column as a Date list of times.- Parameters:
p_iIdx
- The 1-based column index.- Returns:
- The column as a list.
- Throws:
SQLException
- If a database error occurred.ValueCastException
- If the database value could not be cast to Time.
-
getTimeColumn
public List<Date> getTimeColumn(int p_iIdx, Date p_valueIfNull) throws SQLException, ValueCastException
Get a column as a Date list of times.- Parameters:
p_iIdx
- The 1-based column index.p_valueIfNull
- The value to be returned if the database value was NULL.- Returns:
- The column as a list.
- Throws:
SQLException
- If a database error occurred.ValueCastException
- If the database value could not be cast to Time.
-
-