Package org.apache.torque.util
Class ColumnValues
- java.lang.Object
-
- org.apache.torque.util.ColumnValues
-
- All Implemented Interfaces:
Map<Column,JdbcTypedValue>
public class ColumnValues extends Object implements Map<Column,JdbcTypedValue>
A class containing values for database columns. The insertion order of the entries is preserved.- Version:
- $Id: ColumnValues.java 1840416 2018-09-09 15:10:22Z tv $
-
-
Constructor Summary
Constructors Constructor Description ColumnValues()Constructor with no contained column values.ColumnValues(String dbName)Constructor with no contained column values.ColumnValues(Map<Column,JdbcTypedValue> columnValues)Constructor.ColumnValues(Map<Column,JdbcTypedValue> columnValues, String dbName)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()booleancontainsKey(Object key)booleancontainsValue(Object value)Set<Map.Entry<Column,JdbcTypedValue>>entrySet()JdbcTypedValueget(Object key)StringgetDbName()Returns the name of the database handle to use for connection opening.booleanisEmpty()Set<Column>keySet()JdbcTypedValueput(Column key, JdbcTypedValue value)voidputAll(Map<? extends Column,? extends JdbcTypedValue> t)JdbcTypedValueremove(Object key)intsize()StringtoString()Collection<JdbcTypedValue>values()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
-
-
Constructor Detail
-
ColumnValues
public ColumnValues()
Constructor with no contained column values.- Throws:
NullPointerException- if table is null.
-
ColumnValues
public ColumnValues(String dbName)
Constructor with no contained column values.- Parameters:
dbName- the name of the database handle to use for connection opening if needed, or null to use the default database handle for the table.- Throws:
NullPointerException- if table is null.
-
ColumnValues
public ColumnValues(Map<Column,JdbcTypedValue> columnValues)
Constructor.- Parameters:
columnValues- the column values, or null.- Throws:
NullPointerException- if table is null.
-
ColumnValues
public ColumnValues(Map<Column,JdbcTypedValue> columnValues, String dbName)
Constructor.- Parameters:
columnValues- the column values, or null.dbName- the name of the database handle to use for connection opening if needed, or null to use the default database handle for the table.- Throws:
NullPointerException- if table is null.
-
-
Method Detail
-
getDbName
public String getDbName()
Returns the name of the database handle to use for connection opening.- Returns:
- the database name, or null to use the default database handle for the table.
-
size
public int size()
- Specified by:
sizein interfaceMap<Column,JdbcTypedValue>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceMap<Column,JdbcTypedValue>
-
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKeyin interfaceMap<Column,JdbcTypedValue>
-
containsValue
public boolean containsValue(Object value)
- Specified by:
containsValuein interfaceMap<Column,JdbcTypedValue>
-
get
public JdbcTypedValue get(Object key)
- Specified by:
getin interfaceMap<Column,JdbcTypedValue>
-
put
public JdbcTypedValue put(Column key, JdbcTypedValue value)
- Specified by:
putin interfaceMap<Column,JdbcTypedValue>
-
remove
public JdbcTypedValue remove(Object key)
- Specified by:
removein interfaceMap<Column,JdbcTypedValue>
-
putAll
public void putAll(Map<? extends Column,? extends JdbcTypedValue> t)
- Specified by:
putAllin interfaceMap<Column,JdbcTypedValue>
-
clear
public void clear()
- Specified by:
clearin interfaceMap<Column,JdbcTypedValue>
-
values
public Collection<JdbcTypedValue> values()
- Specified by:
valuesin interfaceMap<Column,JdbcTypedValue>
-
entrySet
public Set<Map.Entry<Column,JdbcTypedValue>> entrySet()
- Specified by:
entrySetin interfaceMap<Column,JdbcTypedValue>
-
-