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

com.github.saphyra.randwo.mapping.itemlabel.repository.ItemLabelMappingDao Maven / Gradle / Ivy

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

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

import org.springframework.stereotype.Component;

import com.github.saphyra.dao.AbstractDao;
import com.github.saphyra.randwo.mapping.itemlabel.domain.ItemLabelMapping;


@Component
public class ItemLabelMappingDao extends AbstractDao {
    public ItemLabelMappingDao(ItemLabelMappingConverter converter, ItemLabelMappingRepository repository) {
        super(converter, repository);
    }

    public void deleteByItemId(UUID itemId) {
        repository.deleteByItemId(itemId);
    }

    public void deleteByLabelId(UUID labelId) {
        repository.deleteByLabelId(labelId);
    }

    public Optional findByItemIdAndLabelId(UUID itemId, UUID labelId) {
        return converter.convertEntity(repository.findByItemIdAndLabelId(itemId, labelId));
    }

    public List getByItemId(UUID itemId) {
        return converter.convertEntity(repository.getByItemId(itemId));
    }

    public List getByLabelId(UUID labelId) {
        return converter.convertEntity(repository.getByLabelId(labelId));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy