Class JPAVariableSerializer
- java.lang.Object
-
- org.camunda.bpm.engine.impl.variable.serializer.AbstractTypedValueSerializer<ObjectValue>
-
- org.camunda.bpm.engine.impl.variable.serializer.jpa.JPAVariableSerializer
-
- All Implemented Interfaces:
TypedValueSerializer<ObjectValue>
public class JPAVariableSerializer extends AbstractTypedValueSerializer<ObjectValue>
Variable type capable of storing reference to JPA-entities. Only JPA-Entities which are configured by annotations are supported. Use of compound primary keys is not supported.- Author:
- Frederik Heremans, Daniel Meyer
-
-
Field Summary
Fields Modifier and Type Field Description static String
NAME
-
Fields inherited from class org.camunda.bpm.engine.impl.variable.serializer.AbstractTypedValueSerializer
BINARY_VALUE_TYPES, valueType
-
-
Constructor Summary
Constructors Constructor Description JPAVariableSerializer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
canWriteValue(TypedValue value)
ObjectValue
convertToTypedValue(UntypedValueImpl untypedValue)
Returns a typed value for the provided untyped value.String
getName()
The name of this serializer.protected boolean
isDeserializedObjectValue(TypedValue value)
ObjectValue
readValue(ValueFields valueFields, boolean deserializeObjectValue, boolean asTransientValue)
Retrieve aTypedValue
from the providedValueFields
.void
writeValue(ObjectValue objectValue, ValueFields valueFields)
Serialize aTypedValue
to theValueFields
.-
Methods inherited from class org.camunda.bpm.engine.impl.variable.serializer.AbstractTypedValueSerializer
canHandle, getSerializationDataformat, getType, isMutableValue
-
-
-
-
Field Detail
-
NAME
public static final String NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getName
public String getName()
Description copied from interface:TypedValueSerializer
The name of this serializer. The name is used when persisting the ValueFields populated by this serializer.- Returns:
- the name of this serializer.
-
canWriteValue
protected boolean canWriteValue(TypedValue value)
- Specified by:
canWriteValue
in classAbstractTypedValueSerializer<ObjectValue>
-
isDeserializedObjectValue
protected boolean isDeserializedObjectValue(TypedValue value)
-
convertToTypedValue
public ObjectValue convertToTypedValue(UntypedValueImpl untypedValue)
Description copied from interface:TypedValueSerializer
Returns a typed value for the provided untyped value. This is used on cases where the user sets an untyped value which is then detected to be handled by thisTypedValueSerializer
(by invocation ofTypedValueSerializer.canHandle(TypedValue)
).- Parameters:
untypedValue
- the untyped value- Returns:
- the corresponding typed value
-
writeValue
public void writeValue(ObjectValue objectValue, ValueFields valueFields)
Description copied from interface:TypedValueSerializer
Serialize aTypedValue
to theValueFields
.- Parameters:
objectValue
- theTypedValue
to persistvalueFields
- theValueFields
to which the value should be persisted
-
readValue
public ObjectValue readValue(ValueFields valueFields, boolean deserializeObjectValue, boolean asTransientValue)
Description copied from interface:TypedValueSerializer
Retrieve aTypedValue
from the providedValueFields
.- Parameters:
valueFields
- theValueFields
to retrieve the value fromdeserializeObjectValue
- indicates whether aSerializableValue
should be deserialized.- Returns:
- the
TypedValue
-
-