|
|||||||||
| 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 Form| Nested 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 values| Method Detail |
|---|
public void clear()
clear in interface Mapclear in class org.eclipse.persistence.internal.sessions.AbstractRecordpublic boolean contains(Object value)
contains in class org.eclipse.persistence.internal.sessions.AbstractRecordvalue - the Object to be considered
public boolean containsKey(Object key)
containsKey in interface MapcontainsKey in class org.eclipse.persistence.internal.sessions.AbstractRecordkey - an Object, either String or DatabaseField
public boolean containsKey(String fieldName)
containsKey in class org.eclipse.persistence.internal.sessions.AbstractRecordkey - String, the DatabaseField name
public boolean containsValue(Object value)
containsValue in interface MapcontainsValue in class org.eclipse.persistence.internal.sessions.AbstractRecordvalue - the Object under consideration
public Enumeration elements()
elements in class org.eclipse.persistence.internal.sessions.AbstractRecordpublic Set entrySet()
entrySet in interface MapentrySet in class org.eclipse.persistence.internal.sessions.AbstractRecordMap.entrySet()public Object get(Object key)
get in interface Mapget in class org.eclipse.persistence.internal.sessions.AbstractRecordkey - Object, either String or DatabaseField
public Object get(String fieldName)
get in class org.eclipse.persistence.internal.sessions.AbstractRecordfieldName - String, the DatabaseField name
public Object getIndicatingNoEntry(String fieldName)
getIndicatingNoEntry in class org.eclipse.persistence.internal.sessions.AbstractRecordfieldName - String, the DatabaseField name
public Object getValues(org.eclipse.persistence.internal.helper.DatabaseField key)
getValues in class org.eclipse.persistence.internal.sessions.AbstractRecordkey - DatabaseField
public Object getValues(String key)
getValues in class org.eclipse.persistence.internal.sessions.AbstractRecordkey - String
public boolean isEmpty()
isEmpty in interface MapisEmpty in class org.eclipse.persistence.internal.sessions.AbstractRecordpublic Enumeration keys()
keys in class org.eclipse.persistence.internal.sessions.AbstractRecordpublic Set keySet()
keySet in interface MapkeySet in class org.eclipse.persistence.internal.sessions.AbstractRecord
public Object put(Object key,
Object value)
throws ValidationException
put in interface Mapput in class org.eclipse.persistence.internal.sessions.AbstractRecordkey - Object, either String or DatabaseFieldvalue - Object
ValidationException - if inappropriate key is used
public Object put(String key,
Object value)
put in class org.eclipse.persistence.internal.sessions.AbstractRecordkey - Stringvalue - Object
public void putAll(Map map)
putAll in interface MapputAll in class org.eclipse.persistence.internal.sessions.AbstractRecordmap - Map of all the field-value elements to be addedpublic int size()
size in interface Mapsize in class org.eclipse.persistence.internal.sessions.AbstractRecordpublic Collection values()
values in interface Mapvalues in class org.eclipse.persistence.internal.sessions.AbstractRecord
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||