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

io.smilego.tenant.service.ParamService Maven / Gradle / Ivy

Go to download

A application used as an example on how to set up pushing its components to the Central Repository.

There is a newer version: 1.2.5
Show newest version
package io.smilego.tenant.service;

import io.smilego.tenant.model.Param;
import io.smilego.tenant.model.Tenant;
import io.smilego.tenant.persistence.ParamRepository;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class ParamService {

    protected Logger log = LoggerFactory.getLogger(this.getClass());

    @Autowired
    private ParamRepository paramRepository;

    public List getParamsByServiceId(Long serviceId){
        return this.paramRepository.findParamByServiceId(serviceId)
                .orElseThrow(() -> new RuntimeException("Erro ao pesquisar o param por Service ID " + serviceId));
    }

    public List getAllParams(){
        return paramRepository.findAll();
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy