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
FieldsModifier and TypeFieldDescriptionprotected DatabaseAccessorprotected ResultSetMetaDataprotected booleanprotected DatabasePlatformprotected ResultSetprotected AbstractSessionFields inherited from class org.eclipse.persistence.internal.sessions.ArrayRecord
fieldsArray, valuesArrayFields inherited from class org.eclipse.persistence.internal.sessions.AbstractRecord
fields, lookupField, noEntry, nullValueInFields, size, sopObject, values -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedResultSetRecord(Vector fields, DatabaseField[] fieldsArray, ResultSet resultSet, ResultSetMetaData metaData, DatabaseAccessor accessor, AbstractSession session, DatabasePlatform platform, boolean optimizeData) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidReset the fields and values from the arrays.voidclear()PUBLIC: Clear the contents of 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.INTERNAL: Retrieve the value for the field.booleanIndicates whether resultSet is still here.voidObtains all the value from resultSet and removes it.voidvoidRemove values corresponding to all fields not related to indirection.voidvoidsetSopObject(Object sopObject) INTERNAL:protected StringMethods inherited from class org.eclipse.persistence.internal.sessions.ArrayRecord
add, clone, containsKey, getField, getFields, getValues, put, remove, replaceAt, replaceAt, setFields, setValues, size, toStringMethods 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, 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
-
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:
clearin interfaceMap- Overrides:
clearin 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:
checkValuesin classArrayRecord
-
containsValue
PUBLIC: Check if the value is contained in the row.- Specified by:
containsValuein interfaceMap- Overrides:
containsValuein classArrayRecord
-
get
INTERNAL: Retrieve the value for the field. If missing null is returned.- Overrides:
getin 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:
getIndicatingNoEntryin classArrayRecord
-
toStringAditional
- Overrides:
toStringAditionalin classArrayRecord
-
setSopObject
Description copied from class:AbstractRecordINTERNAL:- Overrides:
setSopObjectin classAbstractRecord
-