org.camunda.bpm.engine.impl.core.variable.value
Class ObjectValueImpl

java.lang.Object
  extended by org.camunda.bpm.engine.impl.core.variable.value.AbstractTypedValue<Object>
      extended by org.camunda.bpm.engine.impl.core.variable.value.ObjectValueImpl
All Implemented Interfaces:
Serializable, ObjectValue, SerializableValue, TypedValue

public class ObjectValueImpl
extends AbstractTypedValue<Object>
implements ObjectValue

Author:
Daniel Meyer
See Also:
Serialized Form

Field Summary
protected  boolean isDeserialized
           
protected  String objectTypeName
           
protected  String serializationDataFormat
           
protected  String serializedValue
           
 
Fields inherited from class org.camunda.bpm.engine.impl.core.variable.value.AbstractTypedValue
type, value
 
Constructor Summary
ObjectValueImpl(Object value)
           
ObjectValueImpl(Object deserializedValue, String serializedValue, String serializationDataFormat, String objectTypeName, boolean isDeserialized)
           
 
Method Summary
 Class<?> getObjectType()
          Returns the Class this object is an instance of.
 String getObjectTypeName()
          A String representation of the Object's type name.
 String getSerializationDataFormat()
          The serialization format used to serialize this value.
 SerializableValueType getType()
          The type of the value.
 Object getValue()
          The actual value.
<T> T
getValue(Class<T> type)
          Returns the object provided by this VariableValue.
 String getValueSerialized()
          Returns the serialized value.
 boolean isDeserialized()
          Returns true in case the object is deserialized.
 void setObjectTypeName(String objectTypeName)
           
 void setSerializationDataFormat(String serializationDataFormat)
           
 void setSerializedValue(String serializedValue)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

objectTypeName

protected String objectTypeName

serializationDataFormat

protected String serializationDataFormat

serializedValue

protected String serializedValue

isDeserialized

protected boolean isDeserialized
Constructor Detail

ObjectValueImpl

public ObjectValueImpl(Object deserializedValue,
                       String serializedValue,
                       String serializationDataFormat,
                       String objectTypeName,
                       boolean isDeserialized)

ObjectValueImpl

public ObjectValueImpl(Object value)
Method Detail

getSerializationDataFormat

public String getSerializationDataFormat()
Description copied from interface: SerializableValue
The serialization format used to serialize this value.

Specified by:
getSerializationDataFormat in interface SerializableValue
Returns:
the serialization format used to serialize this variable.

setSerializationDataFormat

public void setSerializationDataFormat(String serializationDataFormat)

getObjectTypeName

public String getObjectTypeName()
Description copied from interface: ObjectValue
A String representation of the Object's type name. Usually the canonical class name of the Java Class this object is an instance of.

Specified by:
getObjectTypeName in interface ObjectValue
Returns:
the Object's type name.

setObjectTypeName

public void setObjectTypeName(String objectTypeName)

getValueSerialized

public String getValueSerialized()
Description copied from interface: SerializableValue
Returns the serialized value. In case the serializaton data format (as returned by SerializableValue.getSerializationDataFormat()) is not text based, a base 64 encoded representation of the value is returned The serialized value is a snapshot of the state of the value as it is serialized to the process engine database.

Specified by:
getValueSerialized in interface SerializableValue

setSerializedValue

public void setSerializedValue(String serializedValue)

isDeserialized

public boolean isDeserialized()
Description copied from interface: ObjectValue
Returns true in case the object is deserialized. If this method returns true, it is safe to call the methods

Specified by:
isDeserialized in interface ObjectValue
Specified by:
isDeserialized in interface SerializableValue
Returns:
true if the object is deserialized.

getValue

public Object getValue()
Description copied from interface: TypedValue
The actual value. May be null in case the value is null.

Specified by:
getValue in interface ObjectValue
Specified by:
getValue in interface SerializableValue
Specified by:
getValue in interface TypedValue
Overrides:
getValue in class AbstractTypedValue<Object>
Returns:
the value

getValue

public <T> T getValue(Class<T> type)
Description copied from interface: ObjectValue
Returns the object provided by this VariableValue. Allows type-safe access to objects by passing in the class.

Specified by:
getValue in interface ObjectValue
Parameters:
type - the java class the value should be cast to
Returns:
the object represented by this TypedValue.

getObjectType

public Class<?> getObjectType()
Description copied from interface: ObjectValue
Returns the Class this object is an instance of.

Specified by:
getObjectType in interface ObjectValue
Returns:
the Class this object is an instance of

getType

public SerializableValueType getType()
Description copied from interface: TypedValue
The type of the value. See ValueType for a list of built-in ValueTypes.

Specified by:
getType in interface SerializableValue
Specified by:
getType in interface TypedValue
Overrides:
getType in class AbstractTypedValue<Object>
Returns:
the type of the value.

toString

public String toString()
Overrides:
toString in class AbstractTypedValue<Object>


Copyright © 2015 camunda services GmbH. All rights reserved.