Package de.uplanet.lucy.server.util.db
Class DbRowList
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<IDbRow>
,Collection<IDbRow>
,List<IDbRow>
,RandomAccess
,SequencedCollection<IDbRow>
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiongetBigDecimalColumn
(int p_iIdx) Get a column as a BigDecimal list.getBigDecimalColumn
(int p_iIdx, BigDecimal p_valueIfNull) Get a column as a BigDecimal list.getBooleanColumn
(int p_iIdx) Get a column as a Boolean list.getBooleanColumn
(int p_iIdx, Boolean p_valueIfNull) Get a column as a Boolean list.getByteColumn
(int p_iIdx) Get a column as a Byte list.getByteColumn
(int p_iIdx, Byte p_valueIfNull) Get a column as a Byte list.int
Get the numberof columns in this row list.getDateColumn
(int p_iIdx) Get a column as a Date list.getDateColumn
(int p_iIdx, Date p_valueIfNull) Get a column as a Date list.getDoubleColumn
(int p_iIdx) Get a column as a Double list.getDoubleColumn
(int p_iIdx, Double p_valueIfNull) Get a column as a Double list.getFloatColumn
(int p_iIdx) Get a column as a Float list.getFloatColumn
(int p_iIdx, Float p_valueIfNull) Get a column as a Float list.getIntColumn
(int p_iIdx) Get a column as an Integer list.getIntColumn
(int p_iIdx, Integer p_valueIfNull) Get a column as an Integer list.getLongColumn
(int p_iIdx) Get a column as a Long list.getLongColumn
(int p_iIdx, Long p_valueIfNull) Get a column as a Long list.int
Get the numberof rows in this row list.getShortColumn
(int p_iIdx) Get a column as a Short list.getShortColumn
(int p_iIdx, Short p_valueIfNull) Get a column as a Short list.getStringColumn
(int p_iIdx) Get a column as a String list.getStringColumn
(int p_iIdx, String p_valueIfNull) Get a column as a String list.getTimeColumn
(int p_iIdx) Get a column as a Date list of times.getTimeColumn
(int p_iIdx, Date p_valueIfNull) Get a column as a Date list of times.getTimestampColumn
(int p_iIdx) Get a column as a Timestamp list.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, addFirst, addLast, clear, clone, contains, ensureCapacity, equals, forEach, get, getFirst, getLast, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeFirst, removeIf, removeLast, 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, reversed
-
Method Details
-
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
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
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
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
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
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
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
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
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
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
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
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
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.
-