Top Description Fields Constructors Methods
org.eclipse.persistence.internal.sessions

public Class ResultSetRecord

extends ArrayRecord
Class Inheritance
Known Direct Subclasses
org.eclipse.persistence.internal.sessions.SimpleResultSetRecord
Imports
java.sql.ResultSet, .ResultSetMetaData, java.util.Vector, org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor, .DatabasePlatform, org.eclipse.persistence.internal.helper.DatabaseField

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.

Field Summary

Modifier and TypeField and Description
protected transient DatabaseAccessor
protected transient ResultSetMetaData
protected transient boolean
protected transient DatabasePlatform
protected transient ResultSet
protected transient AbstractSession
Inherited from org.eclipse.persistence.internal.sessions.ArrayRecord:
fieldsArrayvaluesArray

Constructor Summary

AccessConstructor and Description
protected
public
ResultSetRecord(Vector<E> fields, DatabaseField[] fieldsArray, ResultSet resultSet, ResultSetMetaData metaData, DatabaseAccessor accessor, AbstractSession session, DatabasePlatform platform, boolean optimizeData)

Method Summary

Modifier and TypeMethod and Description
protected void
checkValues()

Overrides org.eclipse.persistence.internal.sessions.ArrayRecord.checkValues.

Reset the fields and values from the arrays.
public void
clear()

Overrides org.eclipse.persistence.internal.sessions.ArrayRecord.clear.

Implements java.util.Map.clear.

PUBLIC: Clear the contents of the row.
public boolean
containsValue(Object
value whose presence in this map is to be tested
value
)

Overrides org.eclipse.persistence.internal.sessions.ArrayRecord.containsValue.

Implements java.util.Map.containsValue.

PUBLIC: Check if the value is contained in the row.
public Object
get(DatabaseField key)

Overrides org.eclipse.persistence.internal.sessions.ArrayRecord.get.

INTERNAL: Retrieve the value for the field.
public Object
public boolean
hasResultSet()

Indicates whether resultSet is still here.

public void
loadAllValuesFromResultSet()

Obtains all the value from resultSet and removes it.

public void
public void
removeNonIndirectionValues()

Remove values corresponding to all fields not related to indirection.

public void
public void
protected String
Inherited from org.eclipse.persistence.internal.sessions.ArrayRecord:
addclonecontainsKeygetFieldgetFieldsgetValuesputremovereplaceAtreplaceAtsetFieldssetValuessizetoString

Field Detail

accessorback to summary
protected transient DatabaseAccessor accessor
metaDataback to summary
protected transient ResultSetMetaData metaData
optimizeDataback to summary
protected transient boolean optimizeData
platformback to summary
protected transient DatabasePlatform platform
resultSetback to summary
protected transient ResultSet resultSet
sessionback to summary
protected transient AbstractSession session

Constructor Detail

ResultSetRecordback to summary
protected ResultSetRecord()
ResultSetRecordback to summary
public ResultSetRecord(Vector<E> fields, DatabaseField[] fieldsArray, ResultSet resultSet, ResultSetMetaData metaData, DatabaseAccessor accessor, AbstractSession session, DatabasePlatform platform, boolean optimizeData)

Method Detail

checkValuesback to summary
protected void checkValues()

Overrides org.eclipse.persistence.internal.sessions.ArrayRecord.checkValues.

Reset the fields and values from the arrays. This removes the optimization if a non-optimized method is called.

Annotations
@Override
clearback to summary
public void clear()

Overrides org.eclipse.persistence.internal.sessions.ArrayRecord.clear.

Implements java.util.Map.clear.

PUBLIC: Clear the contents of the row.

Annotations
@Override
containsValueback to summary
public boolean containsValue(Object value)

Overrides org.eclipse.persistence.internal.sessions.ArrayRecord.containsValue.

Implements java.util.Map.containsValue.

PUBLIC: Check if the value is contained in the row.

Parameters
value:Object

Doc from java.util.Map.containsValue.

value whose presence in this map is to be tested

Returns:boolean

Doc from java.util.Map.containsValue.

true if this map maps one or more keys to the specified value

Annotations
@Override
getback to summary
public Object get(DatabaseField key)

Overrides org.eclipse.persistence.internal.sessions.ArrayRecord.get.

INTERNAL: Retrieve the value for the field. If missing null is returned.

Annotations
@Override
getIndicatingNoEntryback to summary
public Object getIndicatingNoEntry(DatabaseField key)

Overrides org.eclipse.persistence.internal.sessions.ArrayRecord.getIndicatingNoEntry.

INTERNAL: Retrieve the value for the field. If missing DatabaseRow.noEntry is returned. PERF: This method is a clone of get() for performance.

Annotations
@Override
hasResultSetback to summary
public boolean hasResultSet()

Indicates whether resultSet is still here.

loadAllValuesFromResultSetback to summary
public void loadAllValuesFromResultSet()

Obtains all the value from resultSet and removes it. resultSet must be non null.

removAllValueback to summary
public void removAllValue()
removeNonIndirectionValuesback to summary
public void removeNonIndirectionValues()

Remove values corresponding to all fields not related to indirection.

removeResultSetback to summary
public void removeResultSet()
setSopObjectback to summary
public void setSopObject(Object sopObject)

Overrides org.eclipse.persistence.internal.sessions.AbstractRecord.setSopObject.

Doc from org.eclipse.persistence.internal.sessions.AbstractRecord.setSopObject.

INTERNAL:

Annotations
@Override
toStringAditionalback to summary
protected String toStringAditional()

Overrides org.eclipse.persistence.internal.sessions.ArrayRecord.toStringAditional.

Annotations
@Override