Module org.eclipse.persistence.core
Class ResultSetRecord
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
org.eclipse.persistence.internal.sessions.ResultSetRecord
- All Implemented Interfaces:
Serializable
,Cloneable
,Map
,DataRecord
- Direct Known Subclasses:
SimpleResultSetRecord
PERF: Record used by ObjectLevelReadQuery ResultSet optimization.
The record corresponds to a single position (resultSet.next() is never called).
In case the cached object used instead of creating a new one from the record,
the not needed fields' values are never obtained from resultSet
(that's especially important for expensive LOBs).
If alternatively the record is used to populate an object then all
the values obtained from resultSet and resultSet is nullified.
In this case the fields' values not required after object population
(those not involved in indirection) are nullified to save space in the record.
- 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
Modifier and TypeFieldDescriptionprotected DatabaseAccessor
protected ResultSetMetaData
protected boolean
protected DatabasePlatform
protected ResultSet
protected AbstractSession
Fields inherited from class org.eclipse.persistence.internal.sessions.ArrayRecord
fieldsArray, valuesArray
Fields inherited from class org.eclipse.persistence.internal.sessions.AbstractRecord
fields, lookupField, noEntry, nullValueInFields, size, sopObject, values
-
Constructor Summary
ModifierConstructorDescriptionprotected
ResultSetRecord
(Vector fields, DatabaseField[] fieldsArray, ResultSet resultSet, ResultSetMetaData metaData, DatabaseAccessor accessor, AbstractSession session, DatabasePlatform platform, boolean optimizeData) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Reset the fields and values from the arrays.void
clear()
PUBLIC: Clear the contents of 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.INTERNAL: Retrieve the value for the field.boolean
Indicates whether resultSet is still here.void
Obtains all the value from resultSet and removes it.void
void
Remove values corresponding to all fields not related to indirection.void
void
setSopObject
(Object sopObject) INTERNAL:protected String
Methods inherited from class org.eclipse.persistence.internal.sessions.ArrayRecord
add, clone, containsKey, getField, getFields, getValues, put, remove, replaceAt, replaceAt, setFields, setValues, size, toString
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, 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
-
resultSet
-
metaData
-
accessor
-
platform
-
optimizeData
protected transient boolean optimizeData -
session
-
-
Constructor Details
-
ResultSetRecord
protected ResultSetRecord() -
ResultSetRecord
public ResultSetRecord(Vector fields, DatabaseField[] fieldsArray, ResultSet resultSet, ResultSetMetaData metaData, DatabaseAccessor accessor, AbstractSession session, DatabasePlatform platform, boolean optimizeData)
-
-
Method Details
-
loadAllValuesFromResultSet
public void loadAllValuesFromResultSet()Obtains all the value from resultSet and removes it. resultSet must be non null. -
removeNonIndirectionValues
public void removeNonIndirectionValues()Remove values corresponding to all fields not related to indirection. -
removAllValue
public void removAllValue() -
hasResultSet
public boolean hasResultSet()Indicates whether resultSet is still here. -
removeResultSet
public void removeResultSet() -
clear
public void clear()PUBLIC: Clear the contents of the row.- Specified by:
clear
in interfaceMap
- Overrides:
clear
in classArrayRecord
-
checkValues
protected void checkValues()Reset the fields and values from the arrays. This removes the optimization if a non-optimized method is called.- Overrides:
checkValues
in classArrayRecord
-
containsValue
PUBLIC: Check if the value is contained in the row.- Specified by:
containsValue
in interfaceMap
- Overrides:
containsValue
in classArrayRecord
-
get
INTERNAL: Retrieve the value for the field. If missing null is returned.- Overrides:
get
in classArrayRecord
-
getIndicatingNoEntry
INTERNAL: Retrieve the value for the field. If missing DatabaseRow.noEntry is returned. PERF: This method is a clone of get() for performance.- Overrides:
getIndicatingNoEntry
in classArrayRecord
-
toStringAditional
- Overrides:
toStringAditional
in classArrayRecord
-
setSopObject
Description copied from class:AbstractRecord
INTERNAL:- Overrides:
setSopObject
in classAbstractRecord
-