public class Variable extends Object implements XmlEntity, ModelInstanceAware, ModelIdentifiable
Modifier | Constructor and Description |
---|---|
protected |
Variable()
Creates new empty instance of
Variable . |
|
Variable(Context context,
String name,
String type)
Creates new instance of
Variable . |
|
Variable(Context context,
String name,
String type,
Value value,
boolean isReadOnly)
Creates new instance of
Variable . |
Modifier and Type | Method and Description |
---|---|
Type |
getCompiledType(ModelProviderClientService modelProviderService)
Returns the compiled type.
|
Context |
getContext()
Returns context.
|
com.whitestein.lsps.model.Variable |
getElement(ModelProviderClientService modelProviderService)
Returns the model element.
|
String |
getElementId(ModelProviderClientService modelProviderService)
Returns the model element id.
|
Long |
getInitialVersion()
Returns initial version.
|
ModelInstance |
getModelInstance()
Returns the model instance.
|
String |
getName()
Returns variable name.
|
String |
getType()
Returns the type.
|
Value |
getValue()
Returns variable value.
|
Long |
getVersion()
Returns version.
|
boolean |
isExpressionLocal()
Returns true is the variable is defined in an expression.
|
boolean |
isInternal()
Returns true if this variable is internal.
|
boolean |
isReadOnly()
Returns true if variable is read only.
|
Variable |
makeCopy(ModelInstance targetModelInstance,
Context targetContext)
Returns deep copy.
|
void |
postUnmarshal(javax.xml.bind.Unmarshaller unmarshaller,
Object parent)
Callback method invoked after unmarshalling XML data into target.
|
void |
preUnmarshal(javax.xml.bind.Unmarshaller unmarshaller,
Object parent)
Callback method invoked before unmarshalling into target.
|
void |
rebind(ModelInstance modelInstance)
Re-binds to a model instance.
|
void |
setInternal(boolean internal)
Sets the internal flag of this variable.
|
void |
setIsExpressionLocal(Boolean isExpressionLocal)
Sets the flag that the the variable is defined in an expression
|
String |
toString() |
protected Variable()
Variable
.public Variable(Context context, String name, String type)
Variable
.context
- name
- type
- NullPointerException
- if context
or @{code name} is nullpublic String getName()
public String getType()
public Context getContext()
public Type getCompiledType(ModelProviderClientService modelProviderService)
modelProviderService
- public Value getValue()
public com.whitestein.lsps.model.Variable getElement(ModelProviderClientService modelProviderService)
ModelIdentifiable
getElement
in interface ModelIdentifiable
public String getElementId(ModelProviderClientService modelProviderService)
ModelIdentifiable
getElementId
in interface ModelIdentifiable
public boolean isInternal()
public void setInternal(boolean internal)
internal
- public boolean isExpressionLocal()
public void setIsExpressionLocal(Boolean isExpressionLocal)
isExpressionLocal
- public Long getInitialVersion()
public Long getVersion()
public boolean isReadOnly()
public ModelInstance getModelInstance()
ModelInstanceAware
getModelInstance
in interface ModelInstanceAware
public void preUnmarshal(javax.xml.bind.Unmarshaller unmarshaller, Object parent)
UnmarshalCallback
preUnmarshal
in interface UnmarshalCallback
parent
- instance of JAXB mapped class that will eventually reference target.
null when target is root element.public void postUnmarshal(javax.xml.bind.Unmarshaller unmarshaller, Object parent)
UnmarshalCallback
postUnmarshal
in interface UnmarshalCallback
parent
- instance of JAXB mapped class that will reference target.
null when target is root element.public void rebind(ModelInstance modelInstance)
rebind
in interface ModelInstanceAware
modelInstance
- public Variable makeCopy(ModelInstance targetModelInstance, Context targetContext)
targetModelInstance
- targetContext
- Copyright © 2007-2018 Whitestein Technologies. All Rights Reserved.