Class QuantityAttributeConverter
java.lang.Object
io.micronaut.data.document.tck.entities.QuantityAttributeConverter
- All Implemented Interfaces:
AttributeConverter<Quantity,Integer>
@Singleton
public class QuantityAttributeConverter
extends Object
implements AttributeConverter<Quantity,Integer>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertToEntityValue(Integer value, io.micronaut.core.convert.ConversionContext context) Converts the persisted value to the entity value.convertToPersistedValue(Quantity quantity, io.micronaut.core.convert.ConversionContext context) Converts the entity value to the persisted value.
-
Constructor Details
-
QuantityAttributeConverter
public QuantityAttributeConverter()
-
-
Method Details
-
convertToPersistedValue
public Integer convertToPersistedValue(Quantity quantity, io.micronaut.core.convert.ConversionContext context) Description copied from interface:AttributeConverterConverts the entity value to the persisted value.- Specified by:
convertToPersistedValuein interfaceAttributeConverter<Quantity,Integer> - Parameters:
quantity- The entity valuecontext- The conversion context.- Returns:
- the persisted value
-
convertToEntityValue
public Quantity convertToEntityValue(Integer value, io.micronaut.core.convert.ConversionContext context) Description copied from interface:AttributeConverterConverts the persisted value to the entity value.- Specified by:
convertToEntityValuein interfaceAttributeConverter<Quantity,Integer> - Parameters:
value- The persisted valuecontext- The conversion context.- Returns:
- the entity value
-