Class: Operaton::Bpm::Client::Variable::Impl::Mapper::NullValueMapper

Inherits:
AbstractTypedValueMapper show all
Defined in:
lib/operaton/bpm/client/variable/impl/mapper/null_value_mapper.rb

Overview

Mirrors org.operaton.bpm.client.variable.impl.mapper.NullValueMapper

Instance Attribute Summary

Attributes inherited from AbstractTypedValueMapper

#value_type

Instance Method Summary collapse

Methods inherited from AbstractTypedValueMapper

#can_handle_typed_value, #can_handle_typed_value_field, #serialization_dataformat, #type

Methods included from ValueMapper

#can_handle_typed_value, #can_handle_typed_value_field, #serialization_dataformat, #type

Constructor Details

#initializeNullValueMapper

Returns a new instance of NullValueMapper.



14
15
16
# File 'lib/operaton/bpm/client/variable/impl/mapper/null_value_mapper.rb', line 14

def initialize
  super(Engine::Variable::ValueType::NULL)
end

Instance Method Details

#convert_to_typed_value(_untyped_value) ⇒ Object



18
19
20
# File 'lib/operaton/bpm/client/variable/impl/mapper/null_value_mapper.rb', line 18

def convert_to_typed_value(_untyped_value)
  Engine::Variable::NullValue::INSTANCE
end

#read_value(_typed_value_field, _deserialize = true) ⇒ Object



26
27
28
# File 'lib/operaton/bpm/client/variable/impl/mapper/null_value_mapper.rb', line 26

def read_value(_typed_value_field, _deserialize = true)
  Engine::Variable::NullValue::INSTANCE
end

#write_value(_typed_value, typed_value_field) ⇒ Object



22
23
24
# File 'lib/operaton/bpm/client/variable/impl/mapper/null_value_mapper.rb', line 22

def write_value(_typed_value, typed_value_field)
  typed_value_field.value = nil
end