public abstract class AbstractRowStructure extends java.lang.Object implements RowStructure
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.Class<? extends DataModelObject> |
dmoClass
The DMO class.
|
protected DmoMeta |
dmoMeta
The DMO meta of the DMO class
|
protected boolean |
hasExtents
Check if this row structure should also hydrate the non-expanded extent fields.
|
private PropertyMeta[] |
pm
A cached value of the property meta array that can be found in the record meta
|
| Constructor and Description |
|---|
AbstractRowStructure(DmoMeta dmoMeta)
Create a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addProperty(Property prop)
Append a property to the row structure.
|
void |
forceExtents()
Force the non-expanded extents to be hydrated.
|
java.lang.Class<? extends DataModelObject> |
getDmoClass()
The DMO class whose properties are included in this structure.
|
DmoMeta |
getDmoMeta()
Retrieve the DMO meta for the provided DMO class.
|
protected PropertyMeta[] |
getPropertyMeta()
The property meta array - lazily computed based on the dmo meta.
|
boolean |
hasExtents()
Check if this structure requires a hydration of non-expanded properties.
|
protected void |
hydrateExtents(Session session,
BaseRecord r,
int recOffset)
Hydrate record's non-expanded extents.
|
protected boolean |
isTempTable()
Check if this row structure is for a temporary table.
|
java.lang.String |
toString()
Obtain a short description of this object used for debugging.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddMultiplex, addRecid, getCount, getProps, hydrate, isIncompleteprotected final java.lang.Class<? extends DataModelObject> dmoClass
protected final DmoMeta dmoMeta
protected boolean hasExtents
private PropertyMeta[] pm
public AbstractRowStructure(DmoMeta dmoMeta)
dmoMeta - The DMO metadata of the underlying DMO for this structure.public java.lang.Class<? extends DataModelObject> getDmoClass()
getDmoClass in interface RowStructurepublic boolean addProperty(Property prop)
addProperty in interface RowStructureprop - 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 boolean hasExtents()
addProperty(com.goldencode.p2j.persist.orm.Property) or forceExtents() was
called.hasExtents in interface RowStructuretrue if this structure will also hydrate non-expanded properties.public void forceExtents()
forceExtents in interface RowStructureprotected void hydrateExtents(Session session, BaseRecord r, int recOffset) throws PersistenceException
session - The session to be used to query the non-expanded extent tables.r - The record to be hydrated.recOffset - The offset to which the extent data should be added into the record.PersistenceException - thrown when hydrating extents fails (as it requires extra SQL queries to be run).public java.lang.String toString()
toString in class java.lang.Objectpublic DmoMeta getDmoMeta()
getDmoMeta in interface RowStructureprotected boolean isTempTable()
true if this DMO structure is for a temporary table.protected PropertyMeta[] getPropertyMeta()