public final class InternalRecordHolder extends RecordHolderBase<RecordValue> implements RecordHolder
RecordHolder
used for runtime. It is backed by
given RecordValue
. It translates its values using
RuntimeToPersistentConverter
.NO_PROPERTY_MSG
Constructor and Description |
---|
InternalRecordHolder(RecordValue val,
ModelProvider modelProvider)
Creates new instance of
InternalRecordHolder . |
InternalRecordHolder(RecordValue val,
ModelProvider modelProvider,
Map<RecordProperty,? extends Object> values)
Creates new instance of
InternalRecordHolder . |
Modifier and Type | Method and Description |
---|---|
RecordHolder |
createChangeProxy(RecordHolder proxySet,
boolean isLazySpreading)
Creates change proxy on this record holder.
|
void |
createPropertyProxy(HolderFactory holderFactory,
String property,
RecordHolder proxySet)
Creates change proxy for all object referenced by the propery and sets the proxy values to the property.
|
boolean |
equals(Object obj) |
protected RecordEntityAdapter |
getAdapter()
Returns adapter.
|
String |
getIdentificationString()
Returns identification string (string form of primary key)
|
Object |
getJavaIdentification()
Returns identification in plain java form.
|
RecordHolder |
getOriginalRecord()
Returns proxied record that is not proxy.
|
Object |
getProperty(String name)
Returns the property given the property name, if no such property exists, exception is
thrown.
|
RecordHolder |
getProxiedRecord()
Returns proxied record of this record.
|
int |
getProxyLevel()
For original record it returns 0.
|
RecordProxySetHolder |
getProxySet()
Returns proxySet of this record.
|
RecordHolder |
getRecordOnProxyLevel(int proxyLevel)
Returns record with the defined proxy level or with the smaller level if such does not exist.
|
Long |
getVersion()
Returns version in string format.
|
int |
hashCode() |
boolean |
hasOptimisticLockRelevantChanges()
Returns true if record has changes of properties that affect optimistic lock version.
|
boolean |
isProxy()
Returns true if record is proxy.
|
boolean |
isUpdateNecessary(String property)
Returns true if association should be updated.
|
RecordHolder |
mergeChanges(Namespace namespace,
boolean checkConflicts)
If this is wrapper it merges all its changes to the wrapped record.
|
void |
remove(boolean isCascaded)
Removes record.
|
void |
setProperty(String name,
Object value)
Sets the property given the property name.
|
void |
setThisSideOfAssociation(RecordProperty property,
Object object)
Sets value only this side of the association.
|
asMap, clearRuntimeValues, executeMethod, getBaseLevelHolder, getCompiled, getEvaluationLevel, getJavaObject, getNamespace, getType, isRemoved, setCompiled
getBaseLevelEntityId, getConverter, getEvaluationConverter, getHandle, getId, getModelInstance, getModelProvider, getNotCompiledValueHolder, getProcessModel, getVal, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
asMap, executeMethod, getBaseLevelEntityId, getBaseLevelHolder, getCompiled, getEvaluationLevel, getJavaObject, getNamespace, getType, isRemoved, setCompiled
getId, getNotCompiledValueHolder
public InternalRecordHolder(RecordValue val, ModelProvider modelProvider)
InternalRecordHolder
.val
- modelProvider
- NullPointerException
- if val
or modelProvider
is nullpublic InternalRecordHolder(RecordValue val, ModelProvider modelProvider, Map<RecordProperty,? extends Object> values)
InternalRecordHolder
.val
- modelProvider
- values
- NullPointerException
- if val
or modelProvider
is nullprotected RecordEntityAdapter getAdapter()
RecordHolderBase
getAdapter
in class RecordHolderBase<RecordValue>
public Object getProperty(String name)
RecordHolder
getProperty
in interface RecordHolder
public void setProperty(String name, Object value)
RecordHolder
setProperty
in interface RecordHolder
public String getIdentificationString()
RecordHolder
getIdentificationString
in interface RecordHolder
public Long getVersion()
RecordHolder
getVersion
in interface RecordHolder
public Object getJavaIdentification()
RecordHolder
getJavaIdentification
in interface RecordHolder
public boolean isUpdateNecessary(String property)
AssociationHandler
isUpdateNecessary
in interface AssociationHandler
isUpdateNecessary
in class RecordHolderBase<RecordValue>
public void setThisSideOfAssociation(RecordProperty property, Object object)
AssociationHandler
setThisSideOfAssociation
in interface AssociationHandler
setThisSideOfAssociation
in class RecordHolderBase<RecordValue>
public void remove(boolean isCascaded)
RecordHolder
remove
in interface RecordHolder
public boolean hasOptimisticLockRelevantChanges()
RecordHolder
hasOptimisticLockRelevantChanges
in interface RecordHolder
hasOptimisticLockRelevantChanges
in class RecordHolderBase<RecordValue>
public boolean equals(Object obj)
equals
in class HolderImpl<RecordValue>
public int hashCode()
hashCode
in class HolderImpl<RecordValue>
public RecordHolder createChangeProxy(RecordHolder proxySet, boolean isLazySpreading)
RecordHolder
createChangeProxy
in interface RecordHolder
createChangeProxy
in class RecordHolderBase<RecordValue>
public RecordHolder mergeChanges(Namespace namespace, boolean checkConflicts) throws LspsException
RecordHolder
mergeChanges
in interface RecordHolder
mergeChanges
in class RecordHolderBase<RecordValue>
LspsException
public RecordHolder getProxiedRecord()
RecordHolder
getProxiedRecord
in interface RecordHolder
getProxiedRecord
in class RecordHolderBase<RecordValue>
public RecordHolder getRecordOnProxyLevel(int proxyLevel)
RecordHolder
getRecordOnProxyLevel
in interface RecordHolder
getRecordOnProxyLevel
in class RecordHolderBase<RecordValue>
public RecordHolder getOriginalRecord()
RecordHolder
getOriginalRecord
in interface RecordHolder
getOriginalRecord
in class RecordHolderBase<RecordValue>
public int getProxyLevel()
RecordHolder
getProxyLevel
in interface RecordHolder
getProxyLevel
in class RecordHolderBase<RecordValue>
public RecordProxySetHolder getProxySet()
RecordHolder
getProxySet
in interface RecordHolder
getProxySet
in class RecordHolderBase<RecordValue>
public void createPropertyProxy(HolderFactory holderFactory, String property, RecordHolder proxySet)
RecordHolder
createPropertyProxy
in interface RecordHolder
createPropertyProxy
in class RecordHolderBase<RecordValue>
public boolean isProxy()
RecordHolder
isProxy
in interface RecordHolder
isProxy
in class RecordHolderBase<RecordValue>
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.