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,
java.lang.String type,
Context context,
java.lang.String expression,
Expression compiledExpression,
ClosureOrigin origin)
Creates new instance of
ExpressionValue. |
|
ExpressionValue(long id,
ModelInstance modelInstance,
java.lang.String type,
com.whitestein.lsps.engine.state.xml.ContextValue context,
java.lang.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 java.lang.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.
|
java.lang.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.
|
java.lang.String |
getEvaluationLevel()
Returns evaluation level of this value.
|
java.lang.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.
|
java.lang.Long |
getLowerLevelEntityId()
Returns id of the corresponding value in previous lower level.
|
java.util.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(java.util.Map<java.lang.Long,java.lang.Long> replacementMap)
Replace referenced ids according to mappings in the replacement map.
|
void |
setCompiled(java.lang.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.
|
java.lang.String |
toString() |
clear, collect, fillSerializable, findReplacementId, getCompiledType, getHandle, getId, getModelInstance, getType, isPersistent, isRemoved, setLowerLevelEntity, toSimpleValue, toValueprotected 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,
java.lang.String type,
Context context,
java.lang.String expression,
Expression compiledExpression,
ClosureOrigin origin)
ExpressionValue.id - modelInstance - type - context - expression - compiledExpression - origin - the expression originjava.lang.NullPointerException - if modelInstance or type or context
or expression or expressionType is nullpublic ExpressionValue(long id,
ModelInstance modelInstance,
java.lang.String type,
com.whitestein.lsps.engine.state.xml.ContextValue context,
java.lang.String expression,
Expression compiledExpression,
long baseLevelValueId,
ClosureOrigin origin)
ExpressionValue.id - modelInstance - type - context - expression - compiledExpression - baseLevelValueId - origin - the expression originpublic <T,E extends java.lang.Throwable> T accept(ValueVisitor<T,E> visitor) throws E extends java.lang.Throwable
ValueEE extends java.lang.Throwablepublic java.lang.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.nullprotected NamespaceModel createNamespaceModel(Context context, ModelProvider modelProvider)
public ClosureOrigin getExpressionOrigin()
public int getDebugLine()
public java.util.Collection<Collectible> getReferences()
Collectiblepublic void replaceReferencedIds(java.util.Map<java.lang.Long,java.lang.Long> replacementMap)
ComplexValuereplaceReferencedIds in interface EvaluationLevelAwarereplaceReferencedIds in class ComplexValuepublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getCompiled()
public void setCompiled(java.lang.String compiled)
compiled - public SExpressionValue toSerializable(SModelInstance smi, MarshallerConfig config)
ComplexValuetoSerializable in interface ValuetoSerializable in class ComplexValueprotected void fillSerializable(SExpressionValue s, SModelInstance smi, MarshallerConfig config)
public void replaceIdAndEvaluationLevel(long newId,
long newBaseId)
ComplexValuereplaceIdAndEvaluationLevel in class ComplexValuepublic java.lang.String getEvaluationLevel()
ComplexValuegetEvaluationLevel in interface EvaluationLevelAwaregetEvaluationLevel in class ComplexValuepublic long getBaseLevelEntityId()
getBaseLevelEntityId in interface EvaluationLevelAwaregetBaseLevelEntityId in class ComplexValuepublic ComplexValue getBaseLevelEntity()
getBaseLevelEntity in interface EvaluationLevelAwaregetBaseLevelEntity in class ComplexValuepublic java.lang.Long getLowerLevelEntityId()
getLowerLevelEntityId in interface EvaluationLevelAwaregetLowerLevelEntityId in class ComplexValuepublic ComplexValue getLowerLevelEntity()
getLowerLevelEntity in interface EvaluationLevelAwaregetLowerLevelEntity in class ComplexValueprotected void convertToDirectReferences()
convertToDirectReferences in class ComplexValuepublic void refreshDirectReferences()
EvaluationLevelAwarerefreshDirectReferences in interface EvaluationLevelAwarerefreshDirectReferences in class ComplexValuepublic void finishCopy(com.whitestein.lsps.engine.state.xml.Copiable source,
CopyHelper helper)
finishCopy in class ComplexValuepublic void rebind(ModelInstance modelInstance)
ComplexValuerebind in interface ModelInstanceAwarerebind in class ComplexValuepublic com.whitestein.lsps.engine.state.xml.Copiable createCopy(ModelInstance targetModelInstance)
targetModelInstance - Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.