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(long id,
ModelInstance modelInstance,
String type,
boolean register)
Creates new instance of
ComplexValue . |
protected |
ComplexValue(long id,
ModelInstance modelInstance,
String type,
boolean register,
String level,
Long baseLevelValueId,
Long lowestLevelValueId,
Long lowerLevelValueId)
Creates new instance of
ComplexValue . |
protected |
ComplexValue(ModelInstance modelInstance,
String type,
boolean register)
Creates new instance of
ComplexValue . |
protected |
ComplexValue(ModelInstance modelInstance,
String type,
boolean register,
String level,
Long baseLevelValueId,
Long lowestLevelValueId,
Long lowerLevelValueId)
Creates new instance of
ComplexValue . |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears evaluation data.
|
void |
collect()
Removes itself from the process.
|
protected void |
commonAfterUnmarshal(javax.xml.bind.Unmarshaller unmarshaller,
Object parent)
Common actions in after unmarshal
|
protected Context |
createContext(long parentContextId) |
protected Long |
findReplacementId(Map<Long,Long> replacementMap,
Long oldId)
Returns replacement id.
|
ComplexValue |
getBaseLevelEntity()
Returns base level value.
|
Long |
getBaseLevelEntityId()
Returns id of the corresponding value in base level.
|
Type |
getCompiledType(ModelProviderClientService modelProviderService)
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.
|
ComplexValue |
getLowestLevelEntity()
Returns lowest level value.
|
Long |
getLowestLevelEntityId()
Returns id of the corresponding value in the lowest exiting level.
|
ModelInstance |
getModelInstance()
Returns the model instance.
|
Context |
getOwnContext(long parentContextId)
Returns own context
|
String |
getType()
Returns the type.
|
String |
internalVersionConflictMessage(EvaluationLevelAware entity)
Returns message for internal versioning conflict.
|
boolean |
isInternalyVersioned()
Returns true if the entity is internally (in scope of model instance) versioned.
|
boolean |
isLocked()
Returns true if the context is read only.
|
boolean |
isLowestExistingEntity()
Returns true if this entity is the lowest existing entity.
|
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.
|
void |
replaceIdAndEvaluationLevel(Long newId,
Long newBaseId,
String newEvaluationLevel)
Replace id, base evaluation level entity id and evaluation level in the entity.
|
void |
replaceReferencedIds(Map<Long,Long> replacementMap)
Replace referenced ids according to mappings in the replacement map.
|
boolean |
setLowerLevelEntityId(long lowerLevelId)
Sets lower level entity id if it is correct value.
|
void |
setPersistent(boolean persistent)
Sets persistent flag.
|
SimpleValue |
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. |
void |
updateLevelData(Long baseLevelValueId,
Long lowestLevelValueId,
Long lowerLevelValueId)
Updates references to the corresponding elements in other evaluation levels.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
postUnmarshal, preUnmarshal
getReferences
protected ModelInstance modelInstance
protected ComplexValue()
ComplexValue
.protected ComplexValue(long id, ModelInstance modelInstance, String type, boolean register, String level, Long baseLevelValueId, Long lowestLevelValueId, Long lowerLevelValueId)
ComplexValue
.id
- modelInstance
- type
- register
- level
- baseLevelValueId
- lowestLevelValueId
- lowerLevelValueId
- NullPointerException
- if modelInstance
or type
is nullprotected ComplexValue(long id, ModelInstance modelInstance, String type, boolean register)
ComplexValue
.id
- modelInstance
- type
- register
- NullPointerException
- if modelInstance
or type
is nullprotected ComplexValue(ModelInstance modelInstance, String type, boolean register, String level, Long baseLevelValueId, Long lowestLevelValueId, Long lowerLevelValueId)
ComplexValue
.modelInstance
- type
- register
- level
- baseLevelValueId
- lowestLevelValueId
- lowerLevelValueId
- NullPointerException
- if modelInstance
or type
is nullprotected ComplexValue(ModelInstance modelInstance, String type, boolean register)
ComplexValue
.modelInstance
- type
- register
- NullPointerException
- if modelInstance
or type
is nullpublic long getId()
EntityWithId
getId
in interface EntityWithId
public Handle getHandle()
public Type getCompiledType(ModelProviderClientService modelProviderService)
Value
getCompiledType
in interface Value
public SimpleValue toSimpleValue()
Value
SimpleValue
this method returns this, otherwise it returns a
ValueRef
to this.toSimpleValue
in interface Value
SimpleValue
public Value toValue()
Value
ValueRef
this method returns the referenced value, otherwise it returns
this.public ModelInstance getModelInstance()
ModelInstanceAware
getModelInstance
in interface ModelInstanceAware
public void setPersistent(boolean persistent)
persistent
- public boolean isPersistent()
Collectible
isPersistent
in interface Collectible
public void collect()
Collectible
collect
in interface Collectible
public String getEvaluationLevel()
getEvaluationLevel
in interface EvaluationLevelAware
public boolean isLocked()
isLocked
in interface EvaluationLevelAware
public void rebind(ModelInstance modelInstance)
rebind
in interface ModelInstanceAware
modelInstance
- public void replaceIdAndEvaluationLevel(Long newId, Long newBaseId, String newEvaluationLevel)
EvaluationLevelAware
replaceIdAndEvaluationLevel
in interface EvaluationLevelAware
public void replaceReferencedIds(Map<Long,Long> replacementMap)
replaceReferencedIds
in interface EvaluationLevelAware
replacementMap
- protected Long findReplacementId(Map<Long,Long> replacementMap, Long oldId)
replacementMap
- oldId
- public void updateLevelData(Long baseLevelValueId, Long lowestLevelValueId, Long lowerLevelValueId)
EvaluationLevelAware
updateLevelData
in interface EvaluationLevelAware
public Long getBaseLevelEntityId()
getBaseLevelEntityId
in interface EvaluationLevelAware
public ComplexValue getBaseLevelEntity()
getBaseLevelEntity
in interface EvaluationLevelAware
public Long getLowestLevelEntityId()
getLowestLevelEntityId
in interface EvaluationLevelAware
public ComplexValue getLowestLevelEntity()
getLowestLevelEntity
in interface EvaluationLevelAware
public boolean isLowestExistingEntity()
EvaluationLevelAware
isLowestExistingEntity
in interface EvaluationLevelAware
public Long getLowerLevelEntityId()
getLowerLevelEntityId
in interface EvaluationLevelAware
public ComplexValue getLowerLevelEntity()
getLowerLevelEntity
in interface EvaluationLevelAware
public boolean setLowerLevelEntityId(long lowerLevelId)
lowerLevelId
- protected void commonAfterUnmarshal(javax.xml.bind.Unmarshaller unmarshaller, Object parent)
unmarshaller
- parent
- public boolean isInternalyVersioned()
EvaluationLevelAware
isInternalyVersioned
in interface EvaluationLevelAware
public String internalVersionConflictMessage(EvaluationLevelAware entity)
EvaluationLevelAware
internalVersionConflictMessage
in interface EvaluationLevelAware
public void clear()
EvaluationLevelAware
clear
in interface EvaluationLevelAware
public boolean isRemoved()
Value
protected Context createContext(long parentContextId)
public Context getOwnContext(long parentContextId)
parentContextId
- Copyright © 2007-2018 Whitestein Technologies. All Rights Reserved.