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 void
clear()
boolean
containsKey(Object key)
boolean
containsValue(Object value)
Set<Map.Entry<Column,JdbcTypedValue>>
entrySet()
JdbcTypedValue
get(Object key)
String
getDbName()
Returns the name of the database handle to use for connection opening.boolean
isEmpty()
Set<Column>
keySet()
JdbcTypedValue
put(Column key, JdbcTypedValue value)
void
putAll(Map<? extends Column,? extends JdbcTypedValue> t)
JdbcTypedValue
remove(Object key)
int
size()
String
toString()
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:
size
in interfaceMap<Column,JdbcTypedValue>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceMap<Column,JdbcTypedValue>
-
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKey
in interfaceMap<Column,JdbcTypedValue>
-
containsValue
public boolean containsValue(Object value)
- Specified by:
containsValue
in interfaceMap<Column,JdbcTypedValue>
-
get
public JdbcTypedValue get(Object key)
- Specified by:
get
in interfaceMap<Column,JdbcTypedValue>
-
put
public JdbcTypedValue put(Column key, JdbcTypedValue value)
- Specified by:
put
in interfaceMap<Column,JdbcTypedValue>
-
remove
public JdbcTypedValue remove(Object key)
- Specified by:
remove
in interfaceMap<Column,JdbcTypedValue>
-
putAll
public void putAll(Map<? extends Column,? extends JdbcTypedValue> t)
- Specified by:
putAll
in interfaceMap<Column,JdbcTypedValue>
-
clear
public void clear()
- Specified by:
clear
in interfaceMap<Column,JdbcTypedValue>
-
values
public Collection<JdbcTypedValue> values()
- Specified by:
values
in interfaceMap<Column,JdbcTypedValue>
-
entrySet
public Set<Map.Entry<Column,JdbcTypedValue>> entrySet()
- Specified by:
entrySet
in interfaceMap<Column,JdbcTypedValue>
-
-