Class: Operaton::Bpm::Client::Variable::Impl::Mapper::IntegerValueMapper
- Inherits:
-
NumberValueMapper
- Object
- AbstractTypedValueMapper
- PrimitiveValueMapper
- NumberValueMapper
- Operaton::Bpm::Client::Variable::Impl::Mapper::IntegerValueMapper
- Defined in:
- lib/operaton/bpm/client/variable/impl/mapper/integer_value_mapper.rb
Overview
Mirrors org.operaton.bpm.client.variable.impl.mapper.IntegerValueMapper
Instance Attribute Summary
Attributes inherited from AbstractTypedValueMapper
Instance Method Summary collapse
- #convert_to_typed_value(untyped_value) ⇒ Object
-
#initialize ⇒ IntegerValueMapper
constructor
A new instance of IntegerValueMapper.
- #read_typed_value(typed_value_field) ⇒ Object
- #write_value(int_value, typed_value_field) ⇒ Object
Methods inherited from PrimitiveValueMapper
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, #read_value, #serialization_dataformat, #type
Constructor Details
#initialize ⇒ IntegerValueMapper
Returns a new instance of IntegerValueMapper.
14 15 16 |
# File 'lib/operaton/bpm/client/variable/impl/mapper/integer_value_mapper.rb', line 14 def initialize super(Engine::Variable::ValueType::INTEGER) end |
Instance Method Details
#convert_to_typed_value(untyped_value) ⇒ Object
18 19 20 |
# File 'lib/operaton/bpm/client/variable/impl/mapper/integer_value_mapper.rb', line 18 def convert_to_typed_value(untyped_value) Engine::Variable::Variables.integer_value(untyped_value.value) end |
#read_typed_value(typed_value_field) ⇒ Object
26 27 28 29 |
# File 'lib/operaton/bpm/client/variable/impl/mapper/integer_value_mapper.rb', line 26 def read_typed_value(typed_value_field) value = typed_value_field.value Engine::Variable::Variables.integer_value(value.nil? ? nil : Integer(value)) end |
#write_value(int_value, typed_value_field) ⇒ Object
22 23 24 |
# File 'lib/operaton/bpm/client/variable/impl/mapper/integer_value_mapper.rb', line 22 def write_value(int_value, typed_value_field) typed_value_field.value = int_value.value end |