public class ReadOnlyRecordHolder extends java.lang.Object implements RecordHolder
| Constructor and Description |
|---|
ReadOnlyRecordHolder(ModelProvider modelProvider,
ModelInstance modelInstance,
RecordHolder holder)
Creates new instance.
|
ReadOnlyRecordHolder(ModelProvider modelProvider,
ModelInstance modelInstance,
RecordHolder holder,
ReadOnlyRecordValue value)
Creates new instance.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<java.lang.String,java.lang.Object> |
asMap()
Returns a map view of this record.
|
RecordHolder |
createChangeProxy(RecordHolder proxySet,
boolean isLazySpreading)
Creates change proxy on this record holder.
|
void |
createPropertyProxy(HolderFactory holderFactory,
java.lang.String property,
RecordHolder proxySet)
Creates change proxy for all object referenced by the propery and sets the proxy values to the property.
|
java.lang.Object |
executeMethod(Namespace parentNamespace,
FunctionSignature signature,
java.lang.Object... arguments)
Executes method with parameters.
|
long |
getBaseLevelEntityId()
Returns id of the corresponding record in the base level.
|
RecordHolder |
getBaseLevelHolder()
Returns base level record holder.
|
RecordHolder |
getCompiled(java.lang.Object compiledContext)
Returns instance of the compiled record for this record holder.
|
java.lang.String |
getEvaluationLevel()
Returns the evaluation level.
|
java.lang.String |
getId()
Returns the id of the holder if present.
|
java.lang.String |
getIdentificationString()
Returns identification string (string form of primary key)
|
java.lang.Object |
getJavaIdentification()
Returns identification in plain java form.
|
java.lang.Object |
getJavaObject()
Returns underlying java object if there is some.
|
Namespace |
getNamespace(Namespace parentNamespace)
Returns namespace of this record.
|
ValueHolder |
getNotCompiledValueHolder() |
RecordHolder |
getOriginalRecord()
Returns proxied record that is not proxy.
|
java.lang.Object |
getProperty(java.lang.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.
|
RecordHolder |
getProxySet()
Returns proxySet of this record.
|
RecordHolder |
getRecordOnProxyLevel(int wrappingLevel)
Returns record with the defined proxy level or with the smaller level if such does not exist.
|
RecordType |
getType()
Returns the type of the holder.
|
ReadOnlyRecordValue |
getVal()
Returns value object.
|
java.lang.Long |
getVersion()
Returns version in string format.
|
boolean |
hasOptimisticLockRelevantChanges()
Returns true if record has changes of properties that affect optimistic lock version.
|
boolean |
isProxy()
Returns true if record is proxy.
|
boolean |
isRemoved()
Returns true if the record is removed from the model instance.
|
boolean |
isUpdateNecessary(java.lang.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 |
setCompiled(RecordHolder compiled)
Set instance of compiled record.
|
void |
setProperty(java.lang.String name,
java.lang.Object value)
Sets the property given the property name.
|
void |
setThisSideOfAssociation(RecordProperty property,
java.lang.Object object)
Sets value only this side of the association.
|
public ReadOnlyRecordHolder(ModelProvider modelProvider, ModelInstance modelInstance, RecordHolder holder)
modelProvider - modelInstance - holder - public ReadOnlyRecordHolder(ModelProvider modelProvider, ModelInstance modelInstance, RecordHolder holder, ReadOnlyRecordValue value)
modelProvider - modelInstance - holder - value - public java.lang.String getId()
ValueHoldergetId in interface ValueHolderpublic void setThisSideOfAssociation(RecordProperty property, java.lang.Object object)
AssociationHandlersetThisSideOfAssociation in interface AssociationHandlerpublic boolean isUpdateNecessary(java.lang.String property)
AssociationHandlerisUpdateNecessary in interface AssociationHandlerpublic RecordType getType()
ValueHoldergetType in interface RecordHoldergetType in interface ValueHolderpublic java.lang.Object getProperty(java.lang.String name)
RecordHoldergetProperty in interface RecordHolderpublic void setProperty(java.lang.String name,
java.lang.Object value)
RecordHoldersetProperty in interface RecordHolderpublic java.lang.String getIdentificationString()
RecordHoldergetIdentificationString in interface RecordHolderpublic java.lang.Long getVersion()
RecordHoldergetVersion in interface RecordHolderpublic java.lang.Object getJavaIdentification()
RecordHoldergetJavaIdentification in interface RecordHolderpublic java.util.Map<java.lang.String,java.lang.Object> asMap()
RecordHolderasMap in interface RecordHolderpublic void remove(boolean isCascaded)
RecordHolderremove in interface RecordHolderpublic boolean isRemoved()
RecordHolderisRemoved in interface RecordHolderpublic ReadOnlyRecordValue getVal()
public java.lang.String getEvaluationLevel()
RecordHoldergetEvaluationLevel in interface RecordHolderpublic long getBaseLevelEntityId()
RecordHoldergetBaseLevelEntityId in interface RecordHolderpublic RecordHolder getBaseLevelHolder()
RecordHoldergetBaseLevelHolder in interface RecordHolderpublic boolean hasOptimisticLockRelevantChanges()
RecordHolderhasOptimisticLockRelevantChanges in interface RecordHolderpublic Namespace getNamespace(Namespace parentNamespace)
RecordHoldergetNamespace in interface RecordHolderpublic java.lang.Object getJavaObject()
RecordHoldergetJavaObject in interface RecordHolderpublic RecordHolder mergeChanges(Namespace namespace, boolean checkConflicts)
RecordHoldermergeChanges in interface RecordHolderpublic RecordHolder createChangeProxy(RecordHolder proxySet, boolean isLazySpreading)
RecordHoldercreateChangeProxy in interface RecordHolderpublic RecordHolder getOriginalRecord()
RecordHoldergetOriginalRecord in interface RecordHolderpublic RecordHolder getProxiedRecord()
RecordHoldergetProxiedRecord in interface RecordHolderpublic RecordHolder getRecordOnProxyLevel(int wrappingLevel)
RecordHoldergetRecordOnProxyLevel in interface RecordHolderpublic int getProxyLevel()
RecordHoldergetProxyLevel in interface RecordHolderpublic RecordHolder getProxySet()
RecordHoldergetProxySet in interface RecordHolderpublic void createPropertyProxy(HolderFactory holderFactory, java.lang.String property, RecordHolder proxySet)
RecordHoldercreatePropertyProxy in interface RecordHolderpublic boolean isProxy()
RecordHolderisProxy in interface RecordHolderpublic java.lang.Object executeMethod(Namespace parentNamespace, FunctionSignature signature, java.lang.Object... arguments)
RecordHolderexecuteMethod in interface RecordHolderpublic RecordHolder getCompiled(java.lang.Object compiledContext)
RecordHoldergetCompiled in interface RecordHolderpublic void setCompiled(RecordHolder compiled)
RecordHoldersetCompiled in interface RecordHolderpublic ValueHolder getNotCompiledValueHolder()
getNotCompiledValueHolder in interface ValueHolderCopyright © 2007-2020 Whitestein Technologies. All Rights Reserved.