Oracle Application Server TopLink API Reference
10g (9.0.4.3)

B10491-02

oracle.toplink.publicinterface
Class DatabaseRow

java.lang.Object
  extended byoracle.toplink.publicinterface.DatabaseRow

All Implemented Interfaces:
java.lang.Cloneable, java.util.Map, java.io.Serializable

public class DatabaseRow
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable, java.util.Map

Purpose: Define a representation of a database row as field=>value pairs.

Responsibilities:

See Also:
DatabaseField, Serialized Form

Nested Class Summary
static class DatabaseRow.NoEntry
          NoEntry: This is used to differentiate between the two kinds of nulls: no entry exists, and the field is actually mapped to null.

 

Nested classes inherited from class java.util.Map
java.util.Map.Entry

 

Field Summary
static DatabaseRow.NoEntry noEntry
          indicator showing that no entry exists for a given key.

 

Constructor Summary
DatabaseRow()
          INTERNAL: TopLink converts JDBC results to collections of rows.
DatabaseRow(int initialCapacity)
          INTERNAL: TopLink converts JDBC results to collections of rows.
DatabaseRow(java.util.Vector fields, java.util.Vector values)
          INTERNAL: TopLink converts JDBC results to collections of rows.

 

Method Summary
 void add(oracle.toplink.internal.helper.DatabaseField key, java.lang.Object value)
          INTERNAL: Add the field-value pair to the row.
 void clear()
          PUBLIC: Clear the contents of the row.
 java.lang.Object clone()
          INTERNAL: Clone the row and its values.
 boolean contains(java.lang.Object value)
          PUBLIC: Check if the value is contained in the row.
 boolean containsKey(oracle.toplink.internal.helper.DatabaseField key)
          INTERNAL: Check if the field is contained in the row.
 boolean containsKey(java.lang.Object key)
          PUBLIC: Check if the field is contained in the row.
 boolean containsKey(java.lang.String fieldName)
          PUBLIC: Check if the field is contained in the row.
 boolean containsValue(java.lang.Object value)
          PUBLIC: Check if the value is contained in the row.
 java.util.Enumeration elements()
          PUBLIC: Returns an Enumeration of the values.
 java.util.Set entrySet()
          PUBLIC: Returns a set of the keys.
 java.lang.Object get(oracle.toplink.internal.helper.DatabaseField key)
          INTERNAL: Retrieve the value for the field.
 java.lang.Object get(java.lang.Object key)
          PUBLIC: Retrieve the value for the field name.
 java.lang.Object get(java.lang.String fieldName)
          PUBLIC: Retrieve the value for the field name.
 oracle.toplink.internal.helper.DatabaseField getField(oracle.toplink.internal.helper.DatabaseField key)
          INTERNAL: Returns the row's field with the same name.
 java.util.Vector getFields()
          INTERNAL:
 java.lang.Object getIndicatingNoEntry(oracle.toplink.internal.helper.DatabaseField key)
          INTERNAL: Retrieve the value for the field.
 java.lang.Object getIndicatingNoEntry(java.lang.String fieldName)
          PUBLIC: Retrieve the value for the field name.
 java.util.Vector getValues()
          INTERNAL:
 boolean isEmpty()
          PUBLIC: Return if the row is empty.
 java.util.Enumeration keys()
          PUBLIC: Returns an Enumeration of the DatabaseField objects.
 java.util.Set keySet()
          PUBLIC: Returns a set of the keys.
 java.lang.Object put(oracle.toplink.internal.helper.DatabaseField key, java.lang.Object value)
          INTERNAL: Add the field-value pair to the row.
 java.lang.Object put(java.lang.Object key, java.lang.Object value)
          INTERNAL: Add the field-value pair to the row.
 java.lang.Object put(java.lang.String key, java.lang.Object value)
          INTERNAL: Add the field-value pair to the row.
 void putAll(java.util.Map map)
          PUBLIC: Add all of the elements.
 java.lang.Object remove(oracle.toplink.internal.helper.DatabaseField key)
          INTERNAL: Remove the field key from the row.
 java.lang.Object remove(java.lang.Object key)
          INTERNAL: Remove the field key from the row.
 java.lang.Object remove(java.lang.String fieldName)
          INTERNAL: Remove the field key from the row.
 void replaceAt(java.lang.Object value, int index)
          INTERNAL: replaces the value at index with value
 int size()
          PUBLIC: Return the number of field/value pairs in the row.
 java.lang.String toString()
          INTERNAL:
 java.util.Collection values()
          PUBLIC: Returns an collection of the values.

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Methods inherited from interface java.util.Map
equals, hashCode

 

Field Detail

noEntry

public static DatabaseRow.NoEntry noEntry
indicator showing that no entry exists for a given key.
Constructor Detail

DatabaseRow

public DatabaseRow()
INTERNAL: TopLink converts JDBC results to collections of rows.

DatabaseRow

public DatabaseRow(int initialCapacity)
INTERNAL: TopLink converts JDBC results to collections of rows.

DatabaseRow

public DatabaseRow(java.util.Vector fields,
                   java.util.Vector values)
INTERNAL: TopLink converts JDBC results to collections of rows.
Method Detail

add

public void add(oracle.toplink.internal.helper.DatabaseField key,
                java.lang.Object value)
INTERNAL: Add the field-value pair to the row. Will not check, will simply add to the end of the row

clear

public void clear()
PUBLIC: Clear the contents of the row.
Specified by:
clear in interface java.util.Map

clone

public java.lang.Object clone()
INTERNAL: Clone the row and its values.

contains

public boolean contains(java.lang.Object value)
PUBLIC: Check if the value is contained in the row.

containsKey

public boolean containsKey(java.lang.Object key)
PUBLIC: Check if the field is contained in the row. Conform to hashtable interface.
Specified by:
containsKey in interface java.util.Map

containsKey

public boolean containsKey(java.lang.String fieldName)
PUBLIC: Check if the field is contained in the row.

containsKey

public boolean containsKey(oracle.toplink.internal.helper.DatabaseField key)
INTERNAL: Check if the field is contained in the row.

containsValue

public boolean containsValue(java.lang.Object value)
PUBLIC: Check if the value is contained in the row.
Specified by:
containsValue in interface java.util.Map

elements

public java.util.Enumeration elements()
PUBLIC: Returns an Enumeration of the values.

entrySet

public java.util.Set entrySet()
PUBLIC: Returns a set of the keys.
Specified by:
entrySet in interface java.util.Map

get

public java.lang.Object get(java.lang.Object key)
PUBLIC: Retrieve the value for the field name. A field is constructed on the name to check the hash table. If missing null is returned.
Specified by:
get in interface java.util.Map

get

public java.lang.Object get(java.lang.String fieldName)
PUBLIC: Retrieve the value for the field name. A field is constructed on the name to check the hash table. If missing null is returned.

getIndicatingNoEntry

public java.lang.Object getIndicatingNoEntry(java.lang.String fieldName)
PUBLIC: Retrieve the value for the field name. A field is constructed on the name to check the hash table. If missing DatabaseRow.noEntry is returned.

get

public java.lang.Object get(oracle.toplink.internal.helper.DatabaseField key)
INTERNAL: Retrieve the value for the field. If missing null is returned.

getIndicatingNoEntry

public java.lang.Object getIndicatingNoEntry(oracle.toplink.internal.helper.DatabaseField key)
INTERNAL: Retrieve the value for the field. If missing DatabaseRow.noEntry is returned.

getField

public oracle.toplink.internal.helper.DatabaseField getField(oracle.toplink.internal.helper.DatabaseField key)
INTERNAL: Returns the row's field with the same name.

getFields

public java.util.Vector getFields()
INTERNAL:

getValues

public java.util.Vector getValues()
INTERNAL:

isEmpty

public boolean isEmpty()
PUBLIC: Return if the row is empty.
Specified by:
isEmpty in interface java.util.Map

keys

public java.util.Enumeration keys()
PUBLIC: Returns an Enumeration of the DatabaseField objects.

keySet

public java.util.Set keySet()
PUBLIC: Returns a set of the keys.
Specified by:
keySet in interface java.util.Map

put

public java.lang.Object put(java.lang.Object key,
                            java.lang.Object value)
                     throws ValidationException
INTERNAL: Add the field-value pair to the row.
Specified by:
put in interface java.util.Map
Throws:
ValidationException

put

public java.lang.Object put(java.lang.String key,
                            java.lang.Object value)
INTERNAL: Add the field-value pair to the row.

put

public java.lang.Object put(oracle.toplink.internal.helper.DatabaseField key,
                            java.lang.Object value)
INTERNAL: Add the field-value pair to the row.

putAll

public void putAll(java.util.Map map)
PUBLIC: Add all of the elements.
Specified by:
putAll in interface java.util.Map

remove

public java.lang.Object remove(java.lang.Object key)
INTERNAL: Remove the field key from the row.
Specified by:
remove in interface java.util.Map

remove

public java.lang.Object remove(java.lang.String fieldName)
INTERNAL: Remove the field key from the row.

remove

public java.lang.Object remove(oracle.toplink.internal.helper.DatabaseField key)
INTERNAL: Remove the field key from the row.

replaceAt

public void replaceAt(java.lang.Object value,
                      int index)
INTERNAL: replaces the value at index with value

size

public int size()
PUBLIC: Return the number of field/value pairs in the row.
Specified by:
size in interface java.util.Map

toString

public java.lang.String toString()
INTERNAL:

values

public java.util.Collection values()
PUBLIC: Returns an collection of the values.
Specified by:
values in interface java.util.Map

Copyright © 1998, 2004 Oracle Corporation. All Rights Reserved.