All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.saphyra.randwo.mapping.itemlabel.service.UpdateItemLabelMappingService Maven / Gradle / Ivy

There is a newer version: 1.1.0
Show newest version
package com.github.saphyra.randwo.mapping.itemlabel.service;

import java.util.List;
import java.util.UUID;

import org.springframework.stereotype.Service;

import com.github.saphyra.randwo.mapping.itemlabel.repository.ItemLabelMappingDao;
import com.github.saphyra.randwo.mapping.itemlabel.service.create.CreateItemLabelMappingService;
import lombok.RequiredArgsConstructor;

@Service
@RequiredArgsConstructor
public class UpdateItemLabelMappingService {
    private final ItemLabelMappingDao itemLabelMappingDao;
    private final CreateItemLabelMappingService createItemLabelMappingService;

    public void update(UUID itemId, List labelIds) {
        itemLabelMappingDao.deleteByItemId(itemId);
        createItemLabelMappingService.create(itemId, labelIds);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy