public class ValueRef extends Object implements SimpleValue, ModelInstanceAware
| Modifier and Type | Field and Description |
|---|---|
protected ModelInstance |
modelInstance
Model instance.
|
| Modifier | Constructor and Description |
|---|---|
protected |
ValueRef()
Creates empty instance.
|
|
ValueRef(ModelInstance modelInstance,
long id)
Creates new instance.
|
| Modifier and Type | Method and Description |
|---|---|
<T,E extends Throwable> |
accept(ValueVisitor<T,E> visitor)
Accepts visitor.
|
Type |
getCompiledType(ModelProviderClientService modelProviderService)
Returns the compiled type.
|
ModelInstance |
getModelInstance()
Returns the model instance.
|
String |
getType()
Returns the type.
|
Long |
getValue()
Returns the contained value.
|
boolean |
isRemoved()
Returns true if value is removed
|
ValueRef |
makeCopy(ModelInstance targetModelInstance)
Creates copy of the value in the target model instance.
|
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.
|
SimpleValue |
toSimpleValue()
If this is
SimpleValue this method returns this, otherwise it returns a
ValueRef to this. |
String |
toString() |
Value |
toValue()
If this is a
ValueRef this method returns the referenced value, otherwise it returns
this. |
protected ModelInstance modelInstance
protected ValueRef()
public ValueRef(ModelInstance modelInstance, long id)
modelInstance - id - NullPointerException - if modelInstance is nullpublic Long getValue()
SimpleValuegetValue in interface SimpleValuepublic Type getCompiledType(ModelProviderClientService modelProviderService)
ValuegetCompiledType in interface Valuepublic <T,E extends Throwable> T accept(ValueVisitor<T,E> visitor) throws E extends Throwable
Valuepublic Value toValue()
ValueValueRef this method returns the referenced value, otherwise it returns
this.public ModelInstance getModelInstance()
ModelInstanceAwaregetModelInstance in interface ModelInstanceAwarepublic SimpleValue toSimpleValue()
ValueSimpleValue this method returns this, otherwise it returns a
ValueRef to this.toSimpleValue in interface ValueSimpleValuepublic void preUnmarshal(javax.xml.bind.Unmarshaller unmarshaller, Object parent)
UnmarshalCallbackpreUnmarshal in interface UnmarshalCallbackparent - 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)
UnmarshalCallbackpostUnmarshal in interface UnmarshalCallbackparent - instance of JAXB mapped class that will reference target.
null when target is root element.public void rebind(ModelInstance modelInstance)
rebind in interface ModelInstanceAwaremodelInstance - public ValueRef makeCopy(ModelInstance targetModelInstance)
ValuemakeCopy in interface SimpleValuemakeCopy in interface Valuepublic boolean isRemoved()
ValueCopyright © 2007-2018 Whitestein Technologies. All Rights Reserved.