Class ObjectValueImpl
- java.lang.Object
-
- org.camunda.bpm.engine.variable.impl.value.AbstractTypedValue<java.lang.Object>
-
- org.camunda.bpm.engine.variable.impl.value.ObjectValueImpl
-
- All Implemented Interfaces:
java.io.Serializable,ObjectValue,SerializableValue,TypedValue
public class ObjectValueImpl extends AbstractTypedValue<java.lang.Object> implements ObjectValue
- Author:
- Daniel Meyer
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanisDeserializedprotected java.lang.StringobjectTypeNameprotected java.lang.StringserializationDataFormatprotected java.lang.StringserializedValue-
Fields inherited from class org.camunda.bpm.engine.variable.impl.value.AbstractTypedValue
isTransient, type, value
-
-
Constructor Summary
Constructors Constructor Description ObjectValueImpl(java.lang.Object value)ObjectValueImpl(java.lang.Object value, boolean isTransient)ObjectValueImpl(java.lang.Object deserializedValue, java.lang.String serializedValue, java.lang.String serializationDataFormat, java.lang.String objectTypeName, boolean isDeserialized)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Class<?>getObjectType()Returns the Class this object is an instance of.java.lang.StringgetObjectTypeName()A String representation of the Object's type name.java.lang.StringgetSerializationDataFormat()The serialization format used to serialize this value.SerializableValueTypegetType()The type of the value.java.lang.ObjectgetValue()The actual value.<T> TgetValue(java.lang.Class<T> type)Returns the object provided by this VariableValue.java.lang.StringgetValueSerialized()Returns the serialized value.booleanisDeserialized()Returns true in case the object is deserialized.voidsetObjectTypeName(java.lang.String objectTypeName)voidsetSerializationDataFormat(java.lang.String serializationDataFormat)voidsetSerializedValue(java.lang.String serializedValue)voidsetTransient(boolean isTransient)java.lang.StringtoString()-
Methods inherited from class org.camunda.bpm.engine.variable.impl.value.AbstractTypedValue
isTransient
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.camunda.bpm.engine.variable.value.TypedValue
isTransient
-
-
-
-
Constructor Detail
-
ObjectValueImpl
public ObjectValueImpl(java.lang.Object deserializedValue, java.lang.String serializedValue, java.lang.String serializationDataFormat, java.lang.String objectTypeName, boolean isDeserialized)
-
ObjectValueImpl
public ObjectValueImpl(java.lang.Object value)
-
ObjectValueImpl
public ObjectValueImpl(java.lang.Object value, boolean isTransient)
-
-
Method Detail
-
getSerializationDataFormat
public java.lang.String getSerializationDataFormat()
Description copied from interface:SerializableValueThe serialization format used to serialize this value.- Specified by:
getSerializationDataFormatin interfaceSerializableValue- Returns:
- the serialization format used to serialize this variable.
-
setSerializationDataFormat
public void setSerializationDataFormat(java.lang.String serializationDataFormat)
-
getObjectTypeName
public java.lang.String getObjectTypeName()
Description copied from interface:ObjectValueA 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:
getObjectTypeNamein interfaceObjectValue- Returns:
- the Object's type name.
-
setObjectTypeName
public void setObjectTypeName(java.lang.String objectTypeName)
-
getValueSerialized
public java.lang.String getValueSerialized()
Description copied from interface:SerializableValueReturns the serialized value. In case the serializaton data format (as returned bySerializableValue.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:
getValueSerializedin interfaceSerializableValue
-
setSerializedValue
public void setSerializedValue(java.lang.String serializedValue)
-
isDeserialized
public boolean isDeserialized()
Description copied from interface:ObjectValueReturns true in case the object is deserialized. If this method returns true, it is safe to call the methods- Specified by:
isDeserializedin interfaceObjectValue- Specified by:
isDeserializedin interfaceSerializableValue- Returns:
- true if the object is deserialized.
-
getValue
public java.lang.Object getValue()
Description copied from interface:TypedValueThe actual value. May be null in case the value is null.- Specified by:
getValuein interfaceObjectValue- Specified by:
getValuein interfaceSerializableValue- Specified by:
getValuein interfaceTypedValue- Overrides:
getValuein classAbstractTypedValue<java.lang.Object>- Returns:
- the value
-
getValue
public <T> T getValue(java.lang.Class<T> type)
Description copied from interface:ObjectValueReturns the object provided by this VariableValue. Allows type-safe access to objects by passing in the class.- Specified by:
getValuein interfaceObjectValue- Parameters:
type- the java class the value should be cast to- Returns:
- the object represented by this TypedValue.
-
getObjectType
public java.lang.Class<?> getObjectType()
Description copied from interface:ObjectValueReturns the Class this object is an instance of.- Specified by:
getObjectTypein interfaceObjectValue- Returns:
- the Class this object is an instance of
-
getType
public SerializableValueType getType()
Description copied from interface:TypedValueThe type of the value. See ValueType for a list of built-in ValueTypes.- Specified by:
getTypein interfaceSerializableValue- Specified by:
getTypein interfaceTypedValue- Overrides:
getTypein classAbstractTypedValue<java.lang.Object>- Returns:
- the type of the value.
-
setTransient
public void setTransient(boolean isTransient)
- Overrides:
setTransientin classAbstractTypedValue<java.lang.Object>
-
toString
public java.lang.String toString()
- Overrides:
toStringin classAbstractTypedValue<java.lang.Object>
-
-