Module org.eclipse.persistence.core
Class ArrayRecord
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.ArrayRecord
- All Implemented Interfaces:
Serializable
,Cloneable
,Map
,DataRecord
- Direct Known Subclasses:
ResultSetRecord
PERF: Optimized record implementation using arrays instead of Vector.
Currently only used when fetch rows from the database.
- See Also:
-
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 inherited from class org.eclipse.persistence.internal.sessions.AbstractRecord
fields, lookupField, noEntry, nullValueInFields, size, sopObject, values
-
Constructor Summary
ModifierConstructorDescriptionprotected
ArrayRecord
(Vector fields, DatabaseField[] fieldsArray, Object[] valuesArray) -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(DatabaseField key, Object value) INTERNAL: Add the field-value pair to the row.protected void
Reset the fields and values from the arrays.void
clear()
PUBLIC: Clear the contents of the row.clone()
INTERNAL: Clone the row and its values.boolean
containsKey
(DatabaseField key) INTERNAL: Check if the field is contained in the row.boolean
containsValue
(Object value) PUBLIC: Check if the value is contained in the row.get
(DatabaseField key) INTERNAL: Retrieve the value for the field.getField
(DatabaseField key) INTERNAL: Returns the row's field with the same name.INTERNAL:INTERNAL: Retrieve the value for the field.INTERNAL:put
(DatabaseField key, Object value) INTERNAL: Add the field-value pair to the row.remove
(DatabaseField key) INTERNAL: Remove the field key from the row.void
INTERNAL: replaces the value at index with valuevoid
replaceAt
(Object value, DatabaseField key) INTERNAL: replaces the value at field with valueprotected void
protected void
int
size()
PUBLIC: Return the number of field/value pairs in the row.toString()
INTERNAL:protected String
Methods inherited from class org.eclipse.persistence.internal.sessions.AbstractRecord
contains, containsKey, containsKey, elements, entrySet, get, get, getIndicatingNoEntry, getLookupField, getSopObject, getValues, getValues, hasNullValueInFields, hasSopObject, isEmpty, keys, keySet, mergeFrom, put, put, putAll, remove, remove, resetSize, setNullValueInFields, setSopObject, 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 Details
-
fieldsArray
-
valuesArray
-
-
Constructor Details
-
ArrayRecord
protected ArrayRecord() -
ArrayRecord
-
-
Method Details
-
checkValues
protected void checkValues()Reset the fields and values from the arrays. This removes the optimization if a non-optimized method is called. -
add
INTERNAL: Add the field-value pair to the row. Will not check, will simply add to the end of the row- Overrides:
add
in classAbstractRecord
-
clear
public void clear()PUBLIC: Clear the contents of the row.- Specified by:
clear
in interfaceMap
- Overrides:
clear
in classAbstractRecord
-
clone
INTERNAL: Clone the row and its values.- Overrides:
clone
in classAbstractRecord
-
containsKey
INTERNAL: Check if the field is contained in the row.- Overrides:
containsKey
in classAbstractRecord
-
containsValue
PUBLIC: Check if the value is contained in the row.- Specified by:
containsValue
in interfaceMap
- Overrides:
containsValue
in classAbstractRecord
-
get
INTERNAL: Retrieve the value for the field. If missing null is returned.- Overrides:
get
in classAbstractRecord
-
getIndicatingNoEntry
INTERNAL: Retrieve the value for the field. If missing DatabaseRow.noEntry is returned.- Overrides:
getIndicatingNoEntry
in classAbstractRecord
-
getField
INTERNAL: Returns the row's field with the same name.- Overrides:
getField
in classAbstractRecord
-
getFields
INTERNAL:- Overrides:
getFields
in classAbstractRecord
-
getValues
INTERNAL:- Overrides:
getValues
in classAbstractRecord
-
put
INTERNAL: Add the field-value pair to the row.- Overrides:
put
in classAbstractRecord
-
remove
INTERNAL: Remove the field key from the row.- Overrides:
remove
in classAbstractRecord
-
replaceAt
INTERNAL: replaces the value at index with value- Overrides:
replaceAt
in classAbstractRecord
-
replaceAt
INTERNAL: replaces the value at field with value- Overrides:
replaceAt
in classAbstractRecord
-
setFields
- Overrides:
setFields
in classAbstractRecord
-
setValues
- Overrides:
setValues
in classAbstractRecord
-
size
public int size()PUBLIC: Return the number of field/value pairs in the row.- Specified by:
size
in interfaceMap
- Overrides:
size
in classAbstractRecord
-
toString
Description copied from class:AbstractRecord
INTERNAL:- Overrides:
toString
in classAbstractRecord
-
toStringAditional
-