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

com.capitalone.dashboard.service.AuditResultServiceImpl Maven / Gradle / Ivy

There is a newer version: 3.7.33
Show newest version
package com.capitalone.dashboard.service;

import com.capitalone.dashboard.model.AuditResult;
import com.capitalone.dashboard.model.AuditType;
import com.capitalone.dashboard.repository.AuditResultRepository;
import org.bson.types.ObjectId;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Component;

@Component
public class AuditResultServiceImpl implements AuditResultService{

    @Autowired
    private AuditResultRepository auditResultRepository;

    @Autowired
    public AuditResultServiceImpl(AuditResultRepository auditResultRepository){
        this.auditResultRepository = auditResultRepository;
    }

    @Override
    public AuditResult getAuditResult(ObjectId id){
        return auditResultRepository.findById(id);
    }

    @Override
    public Page getAuditResultsAll(Pageable pageable) {
        return auditResultRepository.findAll(pageable);
    }

    @Override
    public Page getAuditResultsByAuditType(AuditType auditType, Pageable pageable) {
        return auditResultRepository.findByAuditType(auditType, pageable);
    }

    @Override
    public Iterable getAuditResultsByDBoardTitle(String dashboardTitle){
        return auditResultRepository.findByDashboardTitle(dashboardTitle);
    }

    @Override
    public Iterable getAuditResultsByDBoardTitleAndAuditType(String title, AuditType auditType) {
        return auditResultRepository.findByDashboardTitleAndAuditType(title, auditType);
    }

    @Override
    public Iterable getAuditResultsByServAndAppNames(String configItemBusServName, String configItemBusAppName) {
        return auditResultRepository.findByConfigItemBusServNameAndConfigItemBusAppName(configItemBusServName, configItemBusAppName);
    }

    @Override
    public Iterable getAuditResultsByServAndAppNamesAndAuditType(String configItemBusServName, String configItemBusAppName, AuditType auditType) {
        return auditResultRepository.findByConfigItemBusServNameAndConfigItemBusAppNameAndAuditType(configItemBusServName, configItemBusAppName, auditType);
    }

    @Override
    public Page getAuditResultsByLineOfBusAndAuditType(String lineOfBus, AuditType auditType, Pageable pageable) {
        return auditResultRepository.findByLineOfBusinessAndAuditType(lineOfBus, auditType, pageable);
    }

    @Override
    public Page getAuditResultsByLineOfBus(String lineOfBus, Pageable pageable) {
        return auditResultRepository.findByLineOfBusiness(lineOfBus, pageable);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy