Top Description Fields Constructors Methods
org.eclipse.persistence.internal.sessions

public Class EmptyRecord

extends DatabaseRecord
Class Inheritance
Imports
org.eclipse.persistence.internal.helper.DatabaseField, org.eclipse.persistence.sessions.DatabaseRecord

Purpose: Define a singleton empty record to avoid record creation when not required.

Author
James Sutherland
Since
11

Field Summary

Modifier and TypeField and Description
public static final DatabaseRecord
emptyRecord

PERF: Store a singleton empty record to avoid creation when not required.

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public void
add(DatabaseField key, Object value)

Overrides org.eclipse.persistence.internal.sessions.AbstractRecord.add.

INTERNAL: Add the field-value pair to the row.
public DatabaseRecord
public static DatabaseRecord
getEmptyRecord()

Return the singleton empty record.

public Object
put(String
key with which the specified value is to be associated
key
,
Object
value to be associated with the specified key
value
)

Overrides org.eclipse.persistence.internal.sessions.AbstractRecord.put.

Implements java.util.Map.put.

PUBLIC: Add the field-value pair to the row.
public Object
put(DatabaseField
key with which the specified value is to be associated
key
,
Object
value to be associated with the specified key
value
)

Overrides org.eclipse.persistence.internal.sessions.AbstractRecord.put.

Implements java.util.Map.put.

INTERNAL: Add the field-value pair to the row.
public void
replaceAt(Object value, int index)

Overrides org.eclipse.persistence.internal.sessions.AbstractRecord.replaceAt.

INTERNAL: replaces the value at index with value

Field Detail

emptyRecordback to summary
public static final DatabaseRecord emptyRecord

PERF: Store a singleton empty record to avoid creation when not required.

Constructor Detail

EmptyRecordback to summary
protected EmptyRecord()

Method Detail

addback to summary
public void add(DatabaseField key, Object value)

Overrides org.eclipse.persistence.internal.sessions.AbstractRecord.add.

Doc from org.eclipse.persistence.internal.sessions.AbstractRecord.add.

INTERNAL: Add the field-value pair to the row. Will not check, will simply add to the end of the row

Annotations
@Override
cloneback to summary
public DatabaseRecord clone()

Overrides org.eclipse.persistence.internal.sessions.AbstractRecord.clone.

Need to return a real record.

Returns:DatabaseRecord

Doc from java.lang.Object.clone.

a clone of this instance.

Annotations
@Override
getEmptyRecordback to summary
public static DatabaseRecord getEmptyRecord()

Return the singleton empty record.

putback to summary
public Object put(String key, Object value)

Overrides org.eclipse.persistence.internal.sessions.AbstractRecord.put.

Implements java.util.Map.put.

Doc from org.eclipse.persistence.internal.sessions.AbstractRecord.put.

PUBLIC: Add the field-value pair to the row.

Parameters
key:String

Doc from java.util.Map.put.

key with which the specified value is to be associated

value:Object

Doc from java.util.Map.put.

value to be associated with the specified key

Returns:Object

Doc from java.util.Map.put.

the previous value associated with key, or null if there was no mapping for key. (A null return can also indicate that the map previously associated null with key, if the implementation supports null values.)

Annotations
@Override
putback to summary
public Object put(DatabaseField key, Object value)

Overrides org.eclipse.persistence.internal.sessions.AbstractRecord.put.

Implements java.util.Map.put.

Doc from org.eclipse.persistence.internal.sessions.AbstractRecord.put.

INTERNAL: Add the field-value pair to the row.

Parameters
key:DatabaseField

Doc from java.util.Map.put.

key with which the specified value is to be associated

value:Object

Doc from java.util.Map.put.

value to be associated with the specified key

Returns:Object

Doc from java.util.Map.put.

the previous value associated with key, or null if there was no mapping for key. (A null return can also indicate that the map previously associated null with key, if the implementation supports null values.)

Annotations
@Override
replaceAtback to summary
public void replaceAt(Object value, int index)

Overrides org.eclipse.persistence.internal.sessions.AbstractRecord.replaceAt.

Doc from org.eclipse.persistence.internal.sessions.AbstractRecord.replaceAt.

INTERNAL: replaces the value at index with value

Annotations
@Override