|
EclipseLink 1.1.1_ 1.1.1.v20090430-r4097 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.persistence.internal.sessions.AbstractRecord org.eclipse.persistence.sessions.DatabaseRecord
public class DatabaseRecord
Purpose: Define a representation of a database row as field=>value pairs. This is the database row implementation class, the Record or java.util.Map interfaces should be used to access this class instead of the implementation class.
Responsibilities:
DatabaseField
,
Record
,
Map
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from class org.eclipse.persistence.internal.sessions.AbstractRecord |
---|
org.eclipse.persistence.internal.sessions.AbstractRecord.EntrySet, org.eclipse.persistence.internal.sessions.AbstractRecord.KeySet, org.eclipse.persistence.internal.sessions.AbstractRecord.NoEntry, org.eclipse.persistence.internal.sessions.AbstractRecord.RecordEntry, org.eclipse.persistence.internal.sessions.AbstractRecord.RecordEntryIterator, org.eclipse.persistence.internal.sessions.AbstractRecord.RecordKeyIterator, org.eclipse.persistence.internal.sessions.AbstractRecord.RecordValuesIterator, org.eclipse.persistence.internal.sessions.AbstractRecord.ValuesSet |
Nested classes/interfaces inherited from interface java.util.Map |
---|
java.util.Map.Entry<K,V> |
Field Summary |
---|
Fields inherited from class org.eclipse.persistence.internal.sessions.AbstractRecord |
---|
fields, lookupField, noEntry, size, values |
Constructor Summary | |
---|---|
DatabaseRecord()
INTERNAL: Returns a record (of default size). |
|
DatabaseRecord(int initialCapacity)
INTERNAL: Returns a record of the given initial capacity. |
|
DatabaseRecord(java.util.Vector fields,
java.util.Vector values)
INTERNAL: Builds row from database result fields and values. |
Method Summary | |
---|---|
void |
clear()
PUBLIC: Clears the contents of the database row, both fields and values. |
boolean |
contains(java.lang.Object value)
PUBLIC: Checks if the given Object value is contained in the values held in the database row. |
boolean |
containsKey(java.lang.Object key)
PUBLIC: Checks if a key (ie. the field) is contained in the database row. |
boolean |
containsKey(java.lang.String fieldName)
PUBLIC: Checks if a given field is contained in the database row. |
boolean |
containsValue(java.lang.Object value)
PUBLIC: Checks if the given Object value is contained in the values held in the database row. |
java.util.Enumeration |
elements()
PUBLIC: Returns an Enumeration of the values in the database row. |
java.util.Set |
entrySet()
PUBLIC: Returns a set of map entries (ie. field-value pairs)in the database row with the DatabaseFields as keys and the value Objects as values. |
java.lang.Object |
get(java.lang.Object key)
PUBLIC: Retrieves the value for the given key. |
java.lang.Object |
get(java.lang.String fieldName)
PUBLIC: Retrieves the value with the given name of the DatabaseField. |
java.lang.Object |
getIndicatingNoEntry(java.lang.String fieldName)
PUBLIC: Retrieves the value with the given field name. |
java.lang.Object |
getValues(org.eclipse.persistence.internal.helper.DatabaseField key)
PUBLIC: Returns the Object associated with the given key (null if the key does not map to an Object.) |
java.lang.Object |
getValues(java.lang.String key)
PUBLIC: Returns the Object associated with the given key (null if the key does not map to an Object.) |
boolean |
isEmpty()
PUBLIC: Checks if the database row is empty (ie. there are no field-value pairs.) |
java.util.Enumeration |
keys()
PUBLIC: Returns an Enumeration of the DatabaseField Objects. |
java.util.Set |
keySet()
PUBLIC: Returns a set of the keys, the DatabaseField Objects, for the database row. |
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
PUBLIC: Adds a field-value pair to the row. |
java.lang.Object |
put(java.lang.String key,
java.lang.Object value)
PUBLIC: Adds a field-value pair to the row. |
void |
putAll(java.util.Map map)
PUBLIC: Adds all of the elements in the given map to the database row. |
int |
size()
PUBLIC: Returns the number of field-value pairs in the database row. |
java.util.Collection |
values()
PUBLIC: Returns a collection of the values held in the database row. |
Methods inherited from class org.eclipse.persistence.internal.sessions.AbstractRecord |
---|
add, clone, containsKey, get, getField, getFields, getIndicatingNoEntry, getValues, mergeFrom, put, remove, remove, remove, replaceAt, resetSize, setFields, setValues, toString |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
---|
equals, hashCode |
Constructor Detail |
---|
public DatabaseRecord()
public DatabaseRecord(int initialCapacity)
initialCapacity
- public DatabaseRecord(java.util.Vector fields, java.util.Vector values)
fields
- Vector of fieldsvalues
- Vector of valuesMethod Detail |
---|
public void clear()
clear
in interface java.util.Map
clear
in class org.eclipse.persistence.internal.sessions.AbstractRecord
public boolean contains(java.lang.Object value)
contains
in class org.eclipse.persistence.internal.sessions.AbstractRecord
value
- the Object to be considered
public boolean containsKey(java.lang.Object key)
containsKey
in interface java.util.Map
containsKey
in class org.eclipse.persistence.internal.sessions.AbstractRecord
key
- an Object, either String or DatabaseField
public boolean containsKey(java.lang.String fieldName)
containsKey
in class org.eclipse.persistence.internal.sessions.AbstractRecord
key
- String, the DatabaseField name
public boolean containsValue(java.lang.Object value)
containsValue
in interface java.util.Map
containsValue
in class org.eclipse.persistence.internal.sessions.AbstractRecord
value
- the Object under consideration
public java.util.Enumeration elements()
elements
in class org.eclipse.persistence.internal.sessions.AbstractRecord
public java.util.Set entrySet()
entrySet
in interface java.util.Map
entrySet
in class org.eclipse.persistence.internal.sessions.AbstractRecord
Map.entrySet()
public java.lang.Object get(java.lang.Object key)
get
in interface java.util.Map
get
in class org.eclipse.persistence.internal.sessions.AbstractRecord
key
- Object, either String or DatabaseField
public java.lang.Object get(java.lang.String fieldName)
get
in class org.eclipse.persistence.internal.sessions.AbstractRecord
fieldName
- String, the DatabaseField name
public java.lang.Object getIndicatingNoEntry(java.lang.String fieldName)
getIndicatingNoEntry
in class org.eclipse.persistence.internal.sessions.AbstractRecord
fieldName
- String, the DatabaseField name
public java.lang.Object getValues(org.eclipse.persistence.internal.helper.DatabaseField key)
getValues
in class org.eclipse.persistence.internal.sessions.AbstractRecord
key
- DatabaseField
public java.lang.Object getValues(java.lang.String key)
getValues
in class org.eclipse.persistence.internal.sessions.AbstractRecord
key
- String
public boolean isEmpty()
isEmpty
in interface java.util.Map
isEmpty
in class org.eclipse.persistence.internal.sessions.AbstractRecord
public java.util.Enumeration keys()
keys
in class org.eclipse.persistence.internal.sessions.AbstractRecord
public java.util.Set keySet()
keySet
in interface java.util.Map
keySet
in class org.eclipse.persistence.internal.sessions.AbstractRecord
public java.lang.Object put(java.lang.Object key, java.lang.Object value) throws ValidationException
put
in interface java.util.Map
put
in class org.eclipse.persistence.internal.sessions.AbstractRecord
key
- Object, either String or DatabaseFieldvalue
- Object
ValidationException
- if inappropriate key is usedpublic java.lang.Object put(java.lang.String key, java.lang.Object value)
put
in class org.eclipse.persistence.internal.sessions.AbstractRecord
key
- Stringvalue
- Object
public void putAll(java.util.Map map)
putAll
in interface java.util.Map
putAll
in class org.eclipse.persistence.internal.sessions.AbstractRecord
map
- Map of all the field-value elements to be addedpublic int size()
size
in interface java.util.Map
size
in class org.eclipse.persistence.internal.sessions.AbstractRecord
public java.util.Collection values()
values
in interface java.util.Map
values
in class org.eclipse.persistence.internal.sessions.AbstractRecord
|
EclipseLink 1.1.1_ 1.1.1.v20090430-r4097 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |