public class RecordValue extends ComplexValueWithEvalLevels implements RecordChangeProxy, CommonRecordValue
modelInstance| Constructor and Description |
|---|
RecordValue(long id,
ModelInstance modelInstance,
String type,
RecordType compiledType,
Map<String,? extends Value> values)
Creates new instance of
RecordValue. |
RecordValue(long id,
ModelInstance modelInstance,
String type,
RecordType compiledType,
Map<String,? extends Value> values,
String level,
long baseLevelValueId,
ComplexValue lowerLevelValue)
Creates new instance of
RecordValue. |
RecordValue(ModelInstance modelInstance,
ExternalRecordType externalRecordType,
RecordProxySetValue proxySet,
boolean isLazySpreading)
Creates change proxy on non-created external value and adds it provided proxy set.
|
RecordValue(ModelInstance modelInstance,
String type,
RecordType compiledType,
Map<String,? extends Value> values)
Creates new instance of
RecordValue. |
RecordValue(ModelInstance modelInstance,
String type,
RecordType compiledType,
Map<String,? extends Value> values,
String level,
long baseLevelValueId,
ComplexValue lowerLevelValue)
Creates new instance of
RecordValue. |
RecordValue(RecordChangeProxy value,
RecordProxySetValue proxySet,
boolean isLazySpreading)
Creates change proxy on record value.
|
RecordValue(SRecordValue source,
ModelInstance modelInstance)
Creates a new instance from the serialized companion.
|
| Modifier and Type | Method and Description |
|---|---|
<T,E extends Throwable> |
accept(ValueVisitor<T,E> visitor)
Accepts visitor.
|
void |
addPropertyToCreateProxy(String name) |
void |
clear()
Clears evaluation data.
|
void |
clearProxy(Collection<String> properties)
Clear properties on proxy.
|
protected void |
convertToDirectReferences() |
RecordValue |
createChangeProxy(RecordProxySetValue proxySet,
boolean isLazySpreading)
Created a change proxy on this object.
|
protected Context |
createContext(long parentContextId) |
RecordValue |
createCopy(ModelInstance targetModelInstance)
Creates a copy without references to other objects.
|
void |
finishCopy(com.whitestein.lsps.engine.state.xml.Copiable source,
CopyHelper helper)
Copy references.
|
Collection<? extends RecordValue> |
getAllProxies()
Returns all proxies of this record.
|
RecordType |
getCachedCompiledType() |
RecordType |
getCompiledType(ModelProvider modelProvider)
Returns the compiled type.
|
RecordChangeProxy |
getOriginalRecord()
Returns a record object that is original non-proxy record.
|
Context |
getOwnContext(long parentContextId)
Returns own context
|
Set<String> |
getProperties()
Returns the unmodifiable set of property names.
|
Value |
getProperty(String name)
Returns record property by its name or null if given property does not
exist.
|
RecordChangeProxy |
getProxiedRecord()
Returns proxied record.
|
Long |
getProxiedRecordId()
Returns id of proxied record.
|
int |
getProxyLevel()
Gets number of proxies from this object to original non-proxy record.
|
RecordProxySetValue |
getProxySet()
Returns proxy set in which the proxy is registered.
|
Collection<Collectible> |
getReferences()
Returns collection of all referenced collectible objects.
|
Long |
getVersion() |
boolean |
hasProperties()
Returns
true if there is any property set. |
boolean |
hasProperty(String name)
Returns true if the value contains the property.
|
boolean |
isLazySpreadingProxy()
Returns true if the proxy is lazy spreading.
|
boolean |
isPropertyInitialValueChanged(String name)
Returns
true if the property with a given name changed its value. |
boolean |
isPropertyToCreateProxy(String name) |
boolean |
isProxy()
Returns true if this is change proxy for a record.
|
boolean |
isProxyOf(RecordChangeProxy record)
Returns true if this is direct or non-direct proxy of the record.
|
boolean |
isRemoved()
Returns true if value is removed
|
void |
rebind(ModelInstance modelInstance)
Re-binds to a model instance.
|
void |
refreshDirectReferences()
Re-set references to elements from the same model instance.
|
void |
remove()
Set this value to removed.
|
void |
replaceReferencedIds(Map<Long,Long> replacementMap)
Replace referenced ids according to mappings in the replacement map.
|
void |
setProperty(String name,
Value value)
Sets record property.
|
void |
setProxiedRecord(CommonRecordValue val)
Sets proxied record.
|
void |
setProxySet(RecordProxySetValue proxySet) |
void |
setVersion(Long version) |
SRecordValue |
toSerializable(SModelInstance smi,
MarshallerConfig config)
Creates a serializable object.
|
String |
toString() |
Map<String,Value> |
values()
Returns the contained values.
|
fillSerializable, getBaseLevelEntity, getBaseLevelEntityId, getEvaluationLevel, getLowerLevelEntity, getLowerLevelEntityId, replaceIdAndEvaluationLevel, setLowerLevelEntitycollect, findReplacementId, getHandle, getId, getModelInstance, getType, isPersistent, toSimpleValue, toValueclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetId, getModelInstancegetType, toSimpleValue, toValuecollect, isPersistentpublic RecordValue(SRecordValue source, ModelInstance modelInstance)
source - modelInstance - public RecordValue(long id,
ModelInstance modelInstance,
String type,
RecordType compiledType,
Map<String,? extends Value> values,
String level,
long baseLevelValueId,
ComplexValue lowerLevelValue)
RecordValue.id - modelInstance - type - compiledType - a resolved type, may be nullvalues - a map of values, may be nulllevel - baseLevelValueId - lowerLevelValue - NullPointerException - if modelInstance or type or any of its
elements is nullpublic RecordValue(long id,
ModelInstance modelInstance,
String type,
RecordType compiledType,
Map<String,? extends Value> values)
RecordValue.id - modelInstance - type - compiledType - a resolved type, may be nullvalues - a map of values, may be nullNullPointerException - if modelInstance or type or any of its
elements is nullpublic RecordValue(ModelInstance modelInstance, String type, RecordType compiledType, Map<String,? extends Value> values, String level, long baseLevelValueId, ComplexValue lowerLevelValue)
RecordValue.modelInstance - type - compiledType - a resolved type, may be nullvalues - a map of values, may be nulllevel - baseLevelValueId - lowerLevelValue - NullPointerException - if modelInstance or type or any of its
elements is nullpublic RecordValue(ModelInstance modelInstance, String type, RecordType compiledType, Map<String,? extends Value> values)
RecordValue.modelInstance - type - compiledType - a resolved type, may be nullvalues - a map of values, may be nullNullPointerException - if modelInstance or type or any of its
elements is nullpublic RecordValue(RecordChangeProxy value, RecordProxySetValue proxySet, boolean isLazySpreading)
value - proxySet - isLazySpreading - public RecordValue(ModelInstance modelInstance, ExternalRecordType externalRecordType, RecordProxySetValue proxySet, boolean isLazySpreading)
modelInstance - externalRecordType - proxySet - isLazySpreading - public SRecordValue toSerializable(SModelInstance smi, MarshallerConfig config)
ComplexValueWithEvalLevelstoSerializable in interface ValuetoSerializable in class ComplexValueWithEvalLevelspublic RecordType getCompiledType(ModelProvider modelProvider)
ValuegetCompiledType in interface ValuegetCompiledType in class ComplexValuepublic RecordType getCachedCompiledType()
null)public boolean hasProperty(String name)
name - public void setProperty(String name, Value value)
name - property namevalue - new property valueNullPointerException - if name or value is nuvoid checkConflictsOnInternalVersions(EvaluationLevelAware entity);llpublic Value getProperty(String name)
name - NullPointerException - if name is nullpublic Set<String> getProperties()
public boolean hasProperties()
true if there is any property set.
It is equivalent to !getProperties().isEmpty().
true if there is any property setpublic Map<String,Value> values()
public <T,E extends Throwable> T accept(ValueVisitor<T,E> visitor) throws E extends Throwable
Valuepublic Collection<Collectible> getReferences()
CollectiblegetReferences in interface Collectiblepublic void replaceReferencedIds(Map<Long,Long> replacementMap)
ComplexValueWithEvalLevelsreplaceReferencedIds in interface EvaluationLevelAwarereplaceReferencedIds in class ComplexValueWithEvalLevelspublic void rebind(ModelInstance modelInstance)
rebind in interface ModelInstanceAwarerebind in class ComplexValuemodelInstance - public void clear()
EvaluationLevelAwareclear in interface EvaluationLevelAwareclear in class ComplexValuepublic void clearProxy(Collection<String> properties)
properties - public boolean isRemoved()
ValueisRemoved in interface ValueisRemoved in class ComplexValuepublic void remove()
public RecordValue createCopy(ModelInstance targetModelInstance)
public void finishCopy(com.whitestein.lsps.engine.state.xml.Copiable source,
CopyHelper helper)
finishCopy in class ComplexValueWithEvalLevelspublic RecordValue createChangeProxy(RecordProxySetValue proxySet, boolean isLazySpreading)
RecordChangeProxycreateChangeProxy in interface RecordChangeProxypublic boolean isProxy()
public boolean isProxyOf(RecordChangeProxy record)
RecordChangeProxyisProxyOf in interface RecordChangeProxypublic Collection<? extends RecordValue> getAllProxies()
public Long getProxiedRecordId()
isProxy() returns true and proxied record id is null it means that this is proxy for external/shared record that is not created so far.public RecordChangeProxy getProxiedRecord()
public int getProxyLevel()
RecordChangeProxygetProxyLevel in interface RecordChangeProxypublic RecordProxySetValue getProxySet()
RecordChangeProxygetProxySet in interface RecordChangeProxypublic boolean isLazySpreadingProxy()
RecordChangeProxyisLazySpreadingProxy in interface RecordChangeProxypublic RecordChangeProxy getOriginalRecord()
RecordChangeProxygetOriginalRecord in interface RecordChangeProxypublic void setProxiedRecord(CommonRecordValue val)
val - public void setProxySet(RecordProxySetValue proxySet)
protected void convertToDirectReferences()
convertToDirectReferences in class ComplexValueWithEvalLevelspublic void refreshDirectReferences()
EvaluationLevelAwarerefreshDirectReferences in interface EvaluationLevelAwarerefreshDirectReferences in class ComplexValueWithEvalLevelspublic boolean isPropertyInitialValueChanged(String name)
true if the property with a given name changed its value.name - true if the property with a given name changed its valueprotected Context createContext(long parentContextId)
public Context getOwnContext(long parentContextId)
getOwnContext in interface CommonRecordValueparentContextId - public Long getVersion()
public void setVersion(Long version)
public boolean isPropertyToCreateProxy(String name)
public void addPropertyToCreateProxy(String name)
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.