T
- public abstract class RecordHolderBase<T extends ComplexValue> extends HolderImpl<T> implements RecordHolder
RecordHolder
implementations.Modifier and Type | Field and Description |
---|---|
protected static String |
NO_PROPERTY_MSG
Error message.
|
Modifier | Constructor and Description |
---|---|
protected |
RecordHolderBase(T val,
ModelProviderClientService modelProviderService)
Creates new instance of
RecordHolderBase . |
Modifier and Type | Method and Description |
---|---|
Map<String,Object> |
asMap()
Returns a map view of this record.
|
void |
clearRuntimeValues()
Clears referenced runtime values.
|
RecordHolder |
createChangeProxy()
Creates change proxy on this record holder.
|
void |
createPropertyProxy(HolderFactory holderFactory,
String property)
Creates change proxy for all object referenced by the propery and sets the proxy values to the property.
|
Object |
executeMethod(Namespace parentNamespace,
FunctionSignature signature,
Object... arguments)
Executes method with parameters.
|
protected RecordEntityAdapter |
getAdapter()
Returns adapter.
|
RecordHolder |
getBaseLevelHolder()
Returns holder for the base level value.
|
RecordHolder |
getCompiled(Object compiledContext)
Returns instance of the compiled record for this record holder.
|
Object |
getJavaObject()
Returns underlying java object if there is some.
|
Namespace |
getNamespace(Namespace parentNamespace)
Returns namespace of this record.
|
RecordHolder |
getOriginalRecord()
Returns proxied record that is not proxy.
|
RecordHolder |
getProxiedRecord()
Returns proxied record.
|
int |
getProxyLevel()
For original record it returns 0.
|
RecordHolder |
getRecordOnProxyLevel(int wrappingLevel)
Returns record on the defined proxy level or on the smaller level if such does not exist.
|
RecordType |
getType()
Returns the type of the holder.
|
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(String property)
Returns true if association should be updated.
|
RecordHolder |
mergeChanges(Namespace namespace,
boolean cascade,
boolean checkConflicts)
If this is wrapper it merges all its changes to the wrapped record.
|
protected void |
setAdapter(RecordEntityAdapter adapter)
Sets adapter.
|
void |
setCompiled(RecordHolder compiled) |
void |
setThisSideOfAssociation(String name,
Object object)
Sets value only this side of the association.
|
equals, getBaseLevelEntityId, getConverter, getEvaluationConverter, getHandle, getId, getModelInstance, getModelProviderService, getNotCompiledValue, getProcessModel, getVal, hashCode, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getBaseLevelEntityId, getIdentificationString, getJavaIdentification, getProperty, getVersionString, remove, setProperty
getId, getNotCompiledValue
protected static final String NO_PROPERTY_MSG
protected RecordHolderBase(T val, ModelProviderClientService modelProviderService)
RecordHolderBase
.val
- modelProviderService
- NullPointerException
- if val
or modelProviderService
is nullpublic RecordType getType()
ValueHolder
getType
in interface RecordHolder
getType
in interface ValueHolder
getType
in class HolderImpl<T extends ComplexValue>
public Map<String,Object> asMap()
RecordHolder
asMap
in interface RecordHolder
public void setThisSideOfAssociation(String name, Object object)
AssociationHandler
setThisSideOfAssociation
in interface AssociationHandler
public boolean isUpdateNecessary(String property)
AssociationHandler
isUpdateNecessary
in interface AssociationHandler
public void clearRuntimeValues()
HolderImpl
clearRuntimeValues
in class HolderImpl<T extends ComplexValue>
public RecordHolder getBaseLevelHolder()
getBaseLevelHolder
in interface RecordHolder
protected void setAdapter(RecordEntityAdapter adapter)
adapter
- protected RecordEntityAdapter getAdapter()
public boolean hasOptimisticLockRelevantChanges()
RecordHolder
hasOptimisticLockRelevantChanges
in interface RecordHolder
public boolean isRemoved()
RecordHolder
isRemoved
in interface RecordHolder
public Namespace getNamespace(Namespace parentNamespace)
RecordHolder
getNamespace
in interface RecordHolder
public Object getJavaObject()
RecordHolder
getJavaObject
in interface RecordHolder
public RecordHolder mergeChanges(Namespace namespace, boolean cascade, boolean checkConflicts) throws LspsException
RecordHolder
mergeChanges
in interface RecordHolder
LspsException
public RecordHolder createChangeProxy()
RecordHolder
createChangeProxy
in interface RecordHolder
public RecordHolder getOriginalRecord()
RecordHolder
getOriginalRecord
in interface RecordHolder
public RecordHolder getProxiedRecord()
RecordHolder
getProxiedRecord
in interface RecordHolder
public RecordHolder getRecordOnProxyLevel(int wrappingLevel)
RecordHolder
getRecordOnProxyLevel
in interface RecordHolder
public int getProxyLevel()
RecordHolder
getProxyLevel
in interface RecordHolder
public void createPropertyProxy(HolderFactory holderFactory, String property)
RecordHolder
createPropertyProxy
in interface RecordHolder
public boolean isProxy()
RecordHolder
isProxy
in interface RecordHolder
public Object executeMethod(Namespace parentNamespace, FunctionSignature signature, Object... arguments) throws ErrorException
RecordHolder
executeMethod
in interface RecordHolder
ErrorException
public RecordHolder getCompiled(Object compiledContext)
RecordHolder
getCompiled
in interface RecordHolder
public void setCompiled(RecordHolder compiled)
setCompiled
in interface RecordHolder
Copyright © 2007-2018 Whitestein Technologies. All Rights Reserved.