public class AdaptiveRowStructure extends AbstractRowStructure
| Modifier and Type | Field and Description |
|---|---|
private RowStructure |
delegate
The collected fields for select query
|
dmoClass, dmoMeta, hasExtents| Constructor and Description |
|---|
AdaptiveRowStructure(DmoMeta dmoMeta)
Create a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addMultiplex(Property multiplex)
Append the multiplex to the row structure.
|
boolean |
addProperty(Property prop)
Append a property to the row structure.
|
boolean |
addRecid(Property recid)
Append the recid to the row structure.
|
int |
getCount()
Retrieve the number of SQL fields that will be interpreted by this row structure.
|
java.util.Iterator<Property> |
getProps()
Retrieve an iterator to all properties in this structure, including the recid and multiplex.
|
int |
hydrate(Session session,
java.sql.ResultSet resultSet,
int rsOffset,
BaseRecord r)
The core hydration logic based on the row structure.
|
private void |
invalidate()
Invalidation logic that will pick up everything that was appended until now and moved into
an un-ordered implementation.
|
forceExtents, getDmoClass, getDmoMeta, getPropertyMeta, hasExtents, hydrateExtents, isTempTable, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitisIncompleteprivate RowStructure delegate
public AdaptiveRowStructure(DmoMeta dmoMeta)
dmoMeta - The DMO metadata of the underlying DMO for this structure.public boolean addRecid(Property recid)
recid - The recid property to be appended to the structure.true if adding the recid to the row structure succeeded
If there is some invariant on the structure, adding props may fail.public boolean addMultiplex(Property multiplex)
multiplex - The multiplex property to be appended to the structure.true if adding the multiplex to the row structure succeeded
If there is some invariant on the structure, adding props may fail.public boolean addProperty(Property prop)
addProperty in interface RowStructureaddProperty in class AbstractRowStructureprop - The property to be appended to the structure.true if adding the prop to the row structure succeeded
If there is some invariant on the structure, adding props may fail.public int getCount()
public java.util.Iterator<Property> getProps()
public int hydrate(Session session, java.sql.ResultSet resultSet, int rsOffset, BaseRecord r) throws PersistenceException, java.sql.SQLException
session - The underlying session that generated the result-set. It is used only to emit
load SQLs for the non-expanded extents. If this is null, the normalized
extents will be skipped.resultSet - The result-set that provides the low-level data that should be hydrated into
the record.rsOffset - The offset where the DMO starts. This is the case for queries that had joins,
so the current record may not start at index 1.r - The record to be hydrated.PersistenceException - thrown when hydrating extents fails (as it requires extra SQL queries to be run).java.sql.SQLException - throw when failing to hydrate from the result-set.private void invalidate()