|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.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.NoEntry |
Nested classes/interfaces inherited from interface java.util.Map |
---|
Map.Entry<K,V> |
Field Summary |
---|
Fields inherited from class org.eclipse.persistence.internal.sessions.AbstractRecord |
---|
noEntry |
Constructor Summary | |
---|---|
DatabaseRecord()
INTERNAL: Returns a record (of default size). |
|
DatabaseRecord(int initialCapacity)
INTERNAL: Returns a record of the given initial capacity. |
|
DatabaseRecord(Vector fields,
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(Object value)
PUBLIC: Checks if the given Object value is contained in the values held in the database row. |
boolean |
containsKey(Object key)
PUBLIC: Checks if a key (ie. |
boolean |
containsKey(String fieldName)
PUBLIC: Checks if a given field is contained in the database row. |
boolean |
containsValue(Object value)
PUBLIC: Checks if the given Object value is contained in the values held in the database row. |
Enumeration |
elements()
PUBLIC: Returns an Enumeration of the values in the database row. |
Set |
entrySet()
PUBLIC: Returns a set of map entries (ie. |
Object |
get(Object key)
PUBLIC: Retrieves the value for the given key. |
Object |
get(String fieldName)
PUBLIC: Retrieves the value with the given name of the DatabaseField. |
Object |
getIndicatingNoEntry(String fieldName)
PUBLIC: Retrieves the value with the given field name. |
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.) |
Object |
getValues(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. |
Enumeration |
keys()
PUBLIC: Returns an Enumeration of the DatabaseField Objects. |
Set |
keySet()
PUBLIC: Returns a set of the keys, the DatabaseField Objects, for the database row. |
Object |
put(Object key,
Object value)
PUBLIC: Adds a field-value pair to the row. |
Object |
put(String key,
Object value)
PUBLIC: Adds a field-value pair to the row. |
void |
putAll(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. |
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, toString |
Methods inherited from class java.lang.Object |
---|
equals, 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(Vector fields, Vector values)
fields
- Vector of fieldsvalues
- Vector of valuesMethod Detail |
---|
public void clear()
clear
in interface Map
clear
in class org.eclipse.persistence.internal.sessions.AbstractRecord
public boolean contains(Object value)
contains
in class org.eclipse.persistence.internal.sessions.AbstractRecord
value
- the Object to be considered
public boolean containsKey(Object key)
containsKey
in interface Map
containsKey
in class org.eclipse.persistence.internal.sessions.AbstractRecord
key
- an Object, either String or DatabaseField
public boolean containsKey(String fieldName)
containsKey
in class org.eclipse.persistence.internal.sessions.AbstractRecord
key
- String, the DatabaseField name
public boolean containsValue(Object value)
containsValue
in interface Map
containsValue
in class org.eclipse.persistence.internal.sessions.AbstractRecord
value
- the Object under consideration
public Enumeration elements()
elements
in class org.eclipse.persistence.internal.sessions.AbstractRecord
public Set entrySet()
entrySet
in interface Map
entrySet
in class org.eclipse.persistence.internal.sessions.AbstractRecord
Map.entrySet()
public Object get(Object key)
get
in interface Map
get
in class org.eclipse.persistence.internal.sessions.AbstractRecord
key
- Object, either String or DatabaseField
public Object get(String fieldName)
get
in class org.eclipse.persistence.internal.sessions.AbstractRecord
fieldName
- String, the DatabaseField name
public Object getIndicatingNoEntry(String fieldName)
getIndicatingNoEntry
in class org.eclipse.persistence.internal.sessions.AbstractRecord
fieldName
- String, the DatabaseField name
public Object getValues(org.eclipse.persistence.internal.helper.DatabaseField key)
getValues
in class org.eclipse.persistence.internal.sessions.AbstractRecord
key
- DatabaseField
public Object getValues(String key)
getValues
in class org.eclipse.persistence.internal.sessions.AbstractRecord
key
- String
public boolean isEmpty()
isEmpty
in interface Map
isEmpty
in class org.eclipse.persistence.internal.sessions.AbstractRecord
public Enumeration keys()
keys
in class org.eclipse.persistence.internal.sessions.AbstractRecord
public Set keySet()
keySet
in interface Map
keySet
in class org.eclipse.persistence.internal.sessions.AbstractRecord
public Object put(Object key, Object value) throws ValidationException
put
in interface Map
put
in class org.eclipse.persistence.internal.sessions.AbstractRecord
key
- Object, either String or DatabaseFieldvalue
- Object
ValidationException
- if inappropriate key is usedpublic Object put(String key, Object value)
put
in class org.eclipse.persistence.internal.sessions.AbstractRecord
key
- Stringvalue
- Object
public void putAll(Map map)
putAll
in interface 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 Map
size
in class org.eclipse.persistence.internal.sessions.AbstractRecord
public Collection values()
values
in interface Map
values
in class org.eclipse.persistence.internal.sessions.AbstractRecord
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |