public class BinaryValue extends Object implements SimpleValue, ModelInstanceAware, MarshalCallback
Constructor and Description |
---|
BinaryValue()
Creates new instance.
|
BinaryValue(ModelInstance modelInstance,
String level,
byte[] value)
Creates new instance of
BinaryValue . |
BinaryValue(ModelInstance modelInstance,
String level,
byte[] value,
String datasourceJndi,
String recordType,
String objectIdentification,
String propertyName,
Blob blob,
BlobLoader blobLoader)
Creates new instance.
|
BinaryValue(ModelInstance modelInstance,
String level,
String datasourceJndi,
String recordType,
String objectIdentification,
String propertyName,
Blob blob,
BlobLoader blobLoader)
Creates new instance.
|
Modifier and Type | Method and Description |
---|---|
<T,E extends Throwable> |
accept(ValueVisitor<T,E> visitor)
Accepts visitor.
|
Blob |
getBlob()
Returns blob, if fails tries to reload referencing record holder.
|
Type |
getCompiledType(ModelProviderClientService modelProviderService)
Returns the compiled type.
|
byte[] |
getData()
Returns binary data.
|
String |
getDatasourceJndi()
Returns datasource jndi.
|
String |
getEvaluationLevel()
Returns evaluation level,
|
ModelInstance |
getModelInstance()
Returns the model instance.
|
String |
getObjectIdentification()
Returns referenced object identification.
|
String |
getPropertyName()
Returns property name in which binary is stored.
|
String |
getRecordType()
Returns referenced record type.
|
String |
getType()
Returns the type.
|
byte[] |
getValue()
Returns the contained value.
|
boolean |
isRemoved()
Returns true if value is removed
|
BinaryValue |
makeCopy(ModelInstance targetModelInstance)
Creates copy of the value in the target model instance.
|
void |
postMarshal(javax.xml.bind.Marshaller marshaller)
Callback method invoked after marshalling source to XML.
|
void |
postUnmarshal(javax.xml.bind.Unmarshaller unmarshaller,
Object parent)
Callback method invoked after unmarshalling XML data into target.
|
void |
preMarshal(javax.xml.bind.Marshaller marshaller)
Callback method invoked before marshalling from source to XML.
|
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 |
setBlobLoader(BlobLoader blobLoader)
Sets blob loader.
|
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. |
public BinaryValue()
public BinaryValue(ModelInstance modelInstance, String level, byte[] value, String datasourceJndi, String recordType, String objectIdentification, String propertyName, Blob blob, BlobLoader blobLoader)
modelInstance
- level
- value
- datasourceJndi
- recordType
- objectIdentification
- propertyName
- blob
- blobLoader
- public BinaryValue(ModelInstance modelInstance, String level, String datasourceJndi, String recordType, String objectIdentification, String propertyName, Blob blob, BlobLoader blobLoader)
modelInstance
- level
- datasourceJndi
- recordType
- objectIdentification
- propertyName
- blob
- blobLoader
- public BinaryValue(ModelInstance modelInstance, String level, byte[] value)
BinaryValue
.modelInstance
- level
- value
- NullPointerException
- if modelInstance
or value
is nullpublic byte[] getValue()
SimpleValue
getValue
in interface SimpleValue
public <T,E extends Throwable> T accept(ValueVisitor<T,E> visitor) throws E extends Throwable
Value
public ModelInstance getModelInstance()
ModelInstanceAware
getModelInstance
in interface ModelInstanceAware
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 void preMarshal(javax.xml.bind.Marshaller marshaller)
MarshalCallback
preMarshal
in interface MarshalCallback
public void postMarshal(javax.xml.bind.Marshaller marshaller)
MarshalCallback
postMarshal
in interface MarshalCallback
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 Type getCompiledType(ModelProviderClientService modelProviderService)
Value
getCompiledType
in interface Value
public void rebind(ModelInstance modelInstance)
rebind
in interface ModelInstanceAware
modelInstance
- public String getDatasourceJndi()
public String getRecordType()
public String getObjectIdentification()
public String getPropertyName()
public String getEvaluationLevel()
public Blob getBlob()
public void setBlobLoader(BlobLoader blobLoader)
blobLoader
- public byte[] getData()
public BinaryValue makeCopy(ModelInstance targetModelInstance)
Value
makeCopy
in interface SimpleValue
makeCopy
in interface Value
Copyright © 2007-2018 Whitestein Technologies. All Rights Reserved.