public abstract class ExpressionValue extends ComplexValue
Modifier and Type | Class and Description |
---|---|
static class |
ExpressionValue.Type
Type of the contained expression.
|
Modifier and Type | Field and Description |
---|---|
protected Expression |
compiledExpression
Compiled expression.
|
modelInstance
Modifier | Constructor and Description |
---|---|
protected |
ExpressionValue()
Creates new instance of
ExpressionValue . |
protected |
ExpressionValue(ExpressionValue source,
ModelInstance targetModelInstance)
Creates copy instance from source.
|
|
ExpressionValue(long id,
ModelInstance modelInstance,
String type,
Context context,
String expression,
Expression compiledExpression,
ClosureOrigin origin)
Creates new instance of
ExpressionValue . |
|
ExpressionValue(long id,
ModelInstance modelInstance,
String type,
com.whitestein.lsps.engine.state.xml.ContextValue context,
String expression,
Expression compiledExpression,
long baseLevelValueId,
ClosureOrigin origin)
Creates new instance of
ExpressionValue . |
|
ExpressionValue(SExpressionValue 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.
|
protected abstract Expression |
compile(ModelProvider modelProvider) |
protected void |
convertToDirectReferences() |
com.whitestein.lsps.engine.state.xml.Copiable |
createCopy(ModelInstance targetModelInstance)
Creates a copy without references to other objects.
|
protected NamespaceModel |
createNamespaceModel(Context context,
ModelProvider modelProvider) |
protected void |
fillSerializable(SExpressionValue s,
SModelInstance smi,
MarshallerConfig config) |
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.
|
Expression |
getCachedCompiledExpression()
Returns the cached compiled expression.
|
String |
getCompiled()
Name of the class that represents expression compiled to java.
|
Expression |
getCompiledExpression(ModelProvider modelProvider)
Returns the compiled expression.
|
Context |
getContext()
Returns the enclosing context.
|
long |
getContextId()
Returns the enclosing context id.
|
int |
getDebugLine()
Returns debug type.
|
String |
getEvaluationLevel()
Returns evaluation level of this value.
|
String |
getExpression()
Returns the expression.
|
ClosureOrigin |
getExpressionOrigin()
Returns the expression origin.
|
abstract ExpressionValue.Type |
getExpressionType()
Returns the expression type.
|
ComplexValue |
getLowerLevelEntity()
Returns lower level value.
|
Long |
getLowerLevelEntityId()
Returns id of the corresponding value in previous lower level.
|
Collection<Collectible> |
getReferences()
Returns collection of all referenced collectible objects.
|
void |
rebind(ModelInstance modelInstance)
Re-binds to a model instance.
|
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 |
setCompiled(String compiled)
Sets name of the class that represents expression compiled to java.
|
void |
setContext(Context context)
Sets the expression context.
|
SExpressionValue |
toSerializable(SModelInstance smi,
MarshallerConfig config)
Creates a serializable object.
|
String |
toString() |
clear, collect, fillSerializable, findReplacementId, getCompiledType, getHandle, getId, getModelInstance, getType, isPersistent, isRemoved, setLowerLevelEntity, toSimpleValue, toValue
protected Expression compiledExpression
protected ExpressionValue()
ExpressionValue
.protected ExpressionValue(ExpressionValue source, ModelInstance targetModelInstance)
source
- targetModelInstance
- public ExpressionValue(SExpressionValue source, ModelInstance modelInstance)
source
- modelInstance
- public ExpressionValue(long id, ModelInstance modelInstance, String type, Context context, String expression, Expression compiledExpression, ClosureOrigin origin)
ExpressionValue
.id
- modelInstance
- type
- context
- expression
- compiledExpression
- origin
- the expression originNullPointerException
- if modelInstance
or type
or context
or expression
or expressionType
is nullpublic ExpressionValue(long id, ModelInstance modelInstance, String type, com.whitestein.lsps.engine.state.xml.ContextValue context, String expression, Expression compiledExpression, long baseLevelValueId, ClosureOrigin origin)
ExpressionValue
.id
- modelInstance
- type
- context
- expression
- compiledExpression
- baseLevelValueId
- origin
- the expression originpublic <T,E extends Throwable> T accept(ValueVisitor<T,E> visitor) throws E extends Throwable
Value
E
E extends Throwable
public String getExpression()
public Context getContext()
public void setContext(Context context)
context
- public long getContextId()
public abstract ExpressionValue.Type getExpressionType()
public Expression getCompiledExpression(ModelProvider modelProvider)
modelProvider
- protected abstract Expression compile(ModelProvider modelProvider)
public Expression getCachedCompiledExpression()
null
if the
expression is not compiled.null
protected NamespaceModel createNamespaceModel(Context context, ModelProvider modelProvider)
public ClosureOrigin getExpressionOrigin()
public int getDebugLine()
public Collection<Collectible> getReferences()
Collectible
public void replaceReferencedIds(Map<Long,Long> replacementMap)
ComplexValue
replaceReferencedIds
in interface EvaluationLevelAware
replaceReferencedIds
in class ComplexValue
public String getCompiled()
public void setCompiled(String compiled)
compiled
- public SExpressionValue toSerializable(SModelInstance smi, MarshallerConfig config)
ComplexValue
toSerializable
in interface Value
toSerializable
in class ComplexValue
protected void fillSerializable(SExpressionValue s, SModelInstance smi, MarshallerConfig config)
public void replaceIdAndEvaluationLevel(long newId, long newBaseId)
ComplexValue
replaceIdAndEvaluationLevel
in class ComplexValue
public String getEvaluationLevel()
ComplexValue
getEvaluationLevel
in interface EvaluationLevelAware
getEvaluationLevel
in class ComplexValue
public long getBaseLevelEntityId()
getBaseLevelEntityId
in interface EvaluationLevelAware
getBaseLevelEntityId
in class ComplexValue
public ComplexValue getBaseLevelEntity()
getBaseLevelEntity
in interface EvaluationLevelAware
getBaseLevelEntity
in class ComplexValue
public Long getLowerLevelEntityId()
getLowerLevelEntityId
in interface EvaluationLevelAware
getLowerLevelEntityId
in class ComplexValue
public ComplexValue getLowerLevelEntity()
getLowerLevelEntity
in interface EvaluationLevelAware
getLowerLevelEntity
in class ComplexValue
protected void convertToDirectReferences()
convertToDirectReferences
in class ComplexValue
public void refreshDirectReferences()
EvaluationLevelAware
refreshDirectReferences
in interface EvaluationLevelAware
refreshDirectReferences
in class ComplexValue
public void finishCopy(com.whitestein.lsps.engine.state.xml.Copiable source, CopyHelper helper)
finishCopy
in class ComplexValue
public void rebind(ModelInstance modelInstance)
ComplexValue
rebind
in interface ModelInstanceAware
rebind
in class ComplexValue
public com.whitestein.lsps.engine.state.xml.Copiable createCopy(ModelInstance targetModelInstance)
targetModelInstance
- Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.