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
FieldsFields inherited from class org.eclipse.persistence.internal.sessions.AbstractRecord
fields, lookupField, noEntry, nullValueInFields, size, sopObject, values -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedArrayRecord(Vector fields, DatabaseField[] fieldsArray, Object[] valuesArray) -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(DatabaseField key, Object value) INTERNAL: Add the field-value pair to the row.protected voidReset the fields and values from the arrays.voidclear()PUBLIC: Clear the contents of the row.clone()INTERNAL: Clone the row and its values.booleancontainsKey(DatabaseField key) INTERNAL: Check if the field is contained in the row.booleancontainsValue(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.voidINTERNAL: replaces the value at index with valuevoidreplaceAt(Object value, DatabaseField key) INTERNAL: replaces the value at field with valueprotected voidprotected voidintsize()PUBLIC: Return the number of field/value pairs in the row.toString()INTERNAL:protected StringMethods 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, valuesMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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:
addin classAbstractRecord
-
clear
public void clear()PUBLIC: Clear the contents of the row.- Specified by:
clearin interfaceMap- Overrides:
clearin classAbstractRecord
-
clone
INTERNAL: Clone the row and its values.- Overrides:
clonein classAbstractRecord
-
containsKey
INTERNAL: Check if the field is contained in the row.- Overrides:
containsKeyin classAbstractRecord
-
containsValue
PUBLIC: Check if the value is contained in the row.- Specified by:
containsValuein interfaceMap- Overrides:
containsValuein classAbstractRecord
-
get
INTERNAL: Retrieve the value for the field. If missing null is returned.- Overrides:
getin classAbstractRecord
-
getIndicatingNoEntry
INTERNAL: Retrieve the value for the field. If missing DatabaseRow.noEntry is returned.- Overrides:
getIndicatingNoEntryin classAbstractRecord
-
getField
INTERNAL: Returns the row's field with the same name.- Overrides:
getFieldin classAbstractRecord
-
getFields
INTERNAL:- Overrides:
getFieldsin classAbstractRecord
-
getValues
INTERNAL:- Overrides:
getValuesin classAbstractRecord
-
put
INTERNAL: Add the field-value pair to the row.- Overrides:
putin classAbstractRecord
-
remove
INTERNAL: Remove the field key from the row.- Overrides:
removein classAbstractRecord
-
replaceAt
INTERNAL: replaces the value at index with value- Overrides:
replaceAtin classAbstractRecord
-
replaceAt
INTERNAL: replaces the value at field with value- Overrides:
replaceAtin classAbstractRecord
-
setFields
- Overrides:
setFieldsin classAbstractRecord
-
setValues
- Overrides:
setValuesin classAbstractRecord
-
size
public int size()PUBLIC: Return the number of field/value pairs in the row.- Specified by:
sizein interfaceMap- Overrides:
sizein classAbstractRecord
-
toString
Description copied from class:AbstractRecordINTERNAL:- Overrides:
toStringin classAbstractRecord
-
toStringAditional
-