public abstract class ComplexValue extends Object implements Value, Collectible, EntityWithId, ModelInstanceAware, EvaluationLevelAware
Value. The type cannot
be null.| Modifier and Type | Field and Description |
|---|---|
protected ModelInstance |
modelInstance
Model instance.
|
| Modifier | Constructor and Description |
|---|---|
protected |
ComplexValue()
Creates new empty instance of
ComplexValue. |
protected |
ComplexValue(ComplexValue source,
ModelInstance targetModelInstance)
Creates copy instance from source.
|
protected |
ComplexValue(long id,
ModelInstance modelInstance,
String type)
Creates new instance of
ComplexValue. |
protected |
ComplexValue(SComplexValue source,
ModelInstance modelInstance) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears evaluation data.
|
void |
collect()
Removes itself from the process.
|
protected abstract void |
convertToDirectReferences() |
com.whitestein.lsps.engine.state.xml.Copiable |
createCopy(ModelInstance targetModelInstance)
Creates a copy without references to other objects.
|
protected void |
fillSerializable(SComplexValue s,
SModelInstance smi,
MarshallerConfig config)
Fills attributes of the serializable value which is being created.
|
protected Long |
findReplacementId(Map<Long,Long> replacementMap,
Long oldId)
Returns replacement id.
|
void |
finishCopy(com.whitestein.lsps.engine.state.xml.Copiable source,
CopyHelper helper)
Copy references.
|
ComplexValue |
getBaseLevelEntity()
Returns base level value.
|
long |
getBaseLevelEntityId()
Returns id of the corresponding value in base level.
|
Type |
getCompiledType(ModelProvider modelProvider)
Returns the compiled type.
|
String |
getEvaluationLevel()
Returns evaluation level of this value.
|
Handle |
getHandle()
Returns handle.
|
long |
getId()
Returns the id.
|
ComplexValue |
getLowerLevelEntity()
Returns lower level value.
|
Long |
getLowerLevelEntityId()
Returns id of the corresponding value in previous lower level.
|
ModelInstance |
getModelInstance()
Returns the model instance.
|
String |
getType()
Returns the type.
|
boolean |
isPersistent()
Returns true if this object cannot be collected.
|
boolean |
isRemoved()
Returns true if value is removed
|
void |
rebind(ModelInstance modelInstance)
Re-binds to a model instance.
|
abstract void |
refreshDirectReferences()
Re-set references to elements from the same model instance.
|
void |
replaceIdAndEvaluationLevel(long newId,
long newBaseId)
Replaces id and base level entity id.
|
void |
replaceReferencedIds(Map<Long,Long> replacementMap)
Replace referenced ids according to mappings in the replacement map.
|
void |
setLowerLevelEntity(ComplexValue lowerLevelValue)
Sets the lower level value.
|
abstract SComplexValue |
toSerializable(SModelInstance smi,
MarshallerConfig config)
Creates a serializable object.
|
ValueRef |
toSimpleValue()
If this is
SimpleValue this method returns this, otherwise it returns a
ValueRef to this. |
Value |
toValue()
If this is a
ValueRef this method returns the referenced value, otherwise it returns
this. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetReferencesprotected ModelInstance modelInstance
protected ComplexValue()
ComplexValue.protected ComplexValue(ComplexValue source, ModelInstance targetModelInstance)
source - targetModelInstance - protected ComplexValue(SComplexValue source, ModelInstance modelInstance)
protected ComplexValue(long id,
ModelInstance modelInstance,
String type)
ComplexValue.id - modelInstance - type - NullPointerException - if modelInstance or type is nullpublic abstract SComplexValue toSerializable(SModelInstance smi, MarshallerConfig config)
toSerializable in interface Valuesmi - config - protected void fillSerializable(SComplexValue s, SModelInstance smi, MarshallerConfig config)
s - smi - config - public long getId()
EntityWithIdgetId in interface EntityWithIdpublic Handle getHandle()
public Type getCompiledType(ModelProvider modelProvider)
ValuegetCompiledType in interface Valuepublic ValueRef toSimpleValue()
ValueSimpleValue this method returns this, otherwise it returns a
ValueRef to this.toSimpleValue in interface ValueSimpleValuepublic Value toValue()
ValueValueRef this method returns the referenced value, otherwise it returns
this.public ModelInstance getModelInstance()
ModelInstanceAwaregetModelInstance in interface ModelInstanceAwarepublic boolean isPersistent()
CollectibleisPersistent in interface Collectiblepublic void collect()
Collectiblecollect in interface Collectiblepublic String getEvaluationLevel()
getEvaluationLevel in interface EvaluationLevelAwarepublic void rebind(ModelInstance modelInstance)
rebind in interface ModelInstanceAwaremodelInstance - public void replaceIdAndEvaluationLevel(long newId,
long newBaseId)
newId - newBaseId - public void replaceReferencedIds(Map<Long,Long> replacementMap)
replaceReferencedIds in interface EvaluationLevelAwarereplacementMap - protected Long findReplacementId(Map<Long,Long> replacementMap, Long oldId)
replacementMap - oldId - public long getBaseLevelEntityId()
getBaseLevelEntityId in interface EvaluationLevelAwarepublic ComplexValue getBaseLevelEntity()
getBaseLevelEntity in interface EvaluationLevelAwarepublic Long getLowerLevelEntityId()
getLowerLevelEntityId in interface EvaluationLevelAwarepublic ComplexValue getLowerLevelEntity()
getLowerLevelEntity in interface EvaluationLevelAwarepublic void setLowerLevelEntity(ComplexValue lowerLevelValue)
lowerLevelValue - public void clear()
EvaluationLevelAwareclear in interface EvaluationLevelAwarepublic boolean isRemoved()
Valueprotected abstract void convertToDirectReferences()
public abstract void refreshDirectReferences()
EvaluationLevelAwarerefreshDirectReferences in interface EvaluationLevelAwarepublic void finishCopy(com.whitestein.lsps.engine.state.xml.Copiable source,
CopyHelper helper)
public com.whitestein.lsps.engine.state.xml.Copiable createCopy(ModelInstance targetModelInstance)
targetModelInstance - Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.