Module org.eclipse.persistence.core
Class EmptyRecord
- java.lang.Object
-
- org.eclipse.persistence.internal.core.sessions.CoreAbstractRecord
-
- org.eclipse.persistence.internal.sessions.AbstractRecord
-
- org.eclipse.persistence.sessions.DatabaseRecord
-
- org.eclipse.persistence.internal.sessions.EmptyRecord
-
- All Implemented Interfaces:
Serializable,Cloneable,Map,DataRecord
public class EmptyRecord extends DatabaseRecord
Purpose: Define a singleton empty record to avoid record creation when not required.
- Since:
- 11
- Author:
- James Sutherland
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.persistence.internal.sessions.AbstractRecord
AbstractRecord.EntrySet, AbstractRecord.KeySet, AbstractRecord.NoEntry, AbstractRecord.RecordEntry, AbstractRecord.RecordEntryIterator, AbstractRecord.RecordKeyIterator, AbstractRecord.RecordValuesIterator, AbstractRecord.ValuesSet
-
-
Field Summary
Fields Modifier and Type Field Description static DatabaseRecordemptyRecordPERF: Store a singleton empty record to avoid creation when not required.-
Fields inherited from class org.eclipse.persistence.internal.sessions.AbstractRecord
fields, lookupField, noEntry, nullValueInFields, size, sopObject, values
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedEmptyRecord()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(DatabaseField key, Object value)INTERNAL: Add the field-value pair to the row.DatabaseRecordclone()Need to return a real record.static DatabaseRecordgetEmptyRecord()Return the singleton empty record.Objectput(String key, Object value)PUBLIC: Add the field-value pair to the row.Objectput(DatabaseField key, Object value)INTERNAL: Add the field-value pair to the row.voidreplaceAt(Object value, int index)INTERNAL: replaces the value at index with value-
Methods inherited from class org.eclipse.persistence.internal.sessions.AbstractRecord
clear, contains, containsKey, containsKey, containsKey, containsValue, elements, entrySet, get, get, get, getField, getFields, getIndicatingNoEntry, getIndicatingNoEntry, getLookupField, getSopObject, getValues, getValues, getValues, hasNullValueInFields, hasSopObject, isEmpty, keys, keySet, mergeFrom, put, putAll, remove, remove, remove, replaceAt, resetSize, setFields, setNullValueInFields, setSopObject, setValues, size, toString, values
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
-
-
Field Detail
-
emptyRecord
public static final DatabaseRecord emptyRecord
PERF: Store a singleton empty record to avoid creation when not required.
-
-
Method Detail
-
getEmptyRecord
public static DatabaseRecord getEmptyRecord()
Return the singleton empty record.
-
clone
public DatabaseRecord clone()
Need to return a real record.- Overrides:
clonein classAbstractRecord
-
add
public void add(DatabaseField key, Object value)
Description copied from class:AbstractRecordINTERNAL: Add the field-value pair to the row. Will not check, will simply add to the end of the row- Overrides:
addin classAbstractRecord
-
put
public Object put(String key, Object value)
Description copied from class:AbstractRecordPUBLIC: Add the field-value pair to the row.- Overrides:
putin classAbstractRecord
-
put
public Object put(DatabaseField key, Object value)
Description copied from class:AbstractRecordINTERNAL: Add the field-value pair to the row.- Overrides:
putin classAbstractRecord
-
replaceAt
public void replaceAt(Object value, int index)
Description copied from class:AbstractRecordINTERNAL: replaces the value at index with value- Overrides:
replaceAtin classAbstractRecord
-
-