package com.iqser.red.service.persistence.management.v1.processor.utils;

import java.util.function.BiConsumer;

import com.iqser.red.service.persistence.management.v1.processor.entity.annotations.ManualResizeRedactionEntity;
import com.iqser.red.service.persistence.service.v1.api.shared.model.annotations.Rectangle;
import com.iqser.red.service.persistence.service.v1.api.shared.model.annotations.entitymapped.ManualResizeRedaction;
import com.knecon.fforesight.databasetenantcommons.providers.utils.MagicConverter;

public class ManualResizeRedactionMapper implements BiConsumer<ManualResizeRedactionEntity, ManualResizeRedaction> {

    @Override
    public void accept(ManualResizeRedactionEntity manualResizeRedactionEntity, ManualResizeRedaction manualRedaction) {

        manualRedaction.setPositions(MagicConverter.convert(manualResizeRedactionEntity.getPositions(), Rectangle.class));
    }

}
