org.apache.torque.util
Class ColumnValues

java.lang.Object
  extended by 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.

Version:
$Id: ColumnValues.java 1374905 2012-08-20 03:24:18Z tfischer $

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Constructor Summary
ColumnValues()
          Constructor with no contained column values.
ColumnValues(Map<Column,JdbcTypedValue> columnValues)
          Constructor.
ColumnValues(Map<Column,JdbcTypedValue> columnValues, TableMap table, String dbName)
          Constructor.
ColumnValues(TableMap table, String dbName)
          Constructor with no contained column values.
 
Method Summary
 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
equals, hashCode
 

Constructor Detail

ColumnValues

public ColumnValues()
Constructor with no contained column values.

Throws:
NullPointerException - if table is null.

ColumnValues

public ColumnValues(TableMap table,
                    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,
                    TableMap table,
                    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 interface Map<Column,JdbcTypedValue>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Map<Column,JdbcTypedValue>

containsKey

public boolean containsKey(Object key)
Specified by:
containsKey in interface Map<Column,JdbcTypedValue>

containsValue

public boolean containsValue(Object value)
Specified by:
containsValue in interface Map<Column,JdbcTypedValue>

get

public JdbcTypedValue get(Object key)
Specified by:
get in interface Map<Column,JdbcTypedValue>

put

public JdbcTypedValue put(Column key,
                          JdbcTypedValue value)
Specified by:
put in interface Map<Column,JdbcTypedValue>

remove

public JdbcTypedValue remove(Object key)
Specified by:
remove in interface Map<Column,JdbcTypedValue>

putAll

public void putAll(Map<? extends Column,? extends JdbcTypedValue> t)
Specified by:
putAll in interface Map<Column,JdbcTypedValue>

clear

public void clear()
Specified by:
clear in interface Map<Column,JdbcTypedValue>

keySet

public Set<Column> keySet()
Specified by:
keySet in interface Map<Column,JdbcTypedValue>

values

public Collection<JdbcTypedValue> values()
Specified by:
values in interface Map<Column,JdbcTypedValue>

entrySet

public Set<Map.Entry<Column,JdbcTypedValue>> entrySet()
Specified by:
entrySet in interface Map<Column,JdbcTypedValue>

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2000-2012 The Apache Software Foundation. All Rights Reserved.