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

com.github.saphyra.randwo.mapping.itemvalue.repository.ItemValueMappingDao Maven / Gradle / Ivy

There is a newer version: 1.1.0
Show newest version
package com.github.saphyra.randwo.mapping.itemvalue.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.itemvalue.domain.ItemValueMapping;

@Component
public class ItemValueMappingDao extends AbstractDao {
    public ItemValueMappingDao(ItemValueMappingConverter converter, ItemValueMappingRepository repository) {
        super(converter, repository);
    }

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

    public void deleteByKeyId(UUID keyId) {
        repository.deleteByKeyId(keyId);
    }

    public Optional findByItemIdAndKeyId(UUID itemId, UUID keyId) {
        return converter.convertEntity(repository.findByItemIdAndKeyId(itemId, keyId));
    }

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

    public List getByKeyId(UUID keyId) {
        return converter.convertEntity(repository.getByKeyId(keyId));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy