package com.service.impl;

import com.entity.Member;
import com.repository.MemberProjectRepository;
import com.service.MemberProjectService;
import org.springframework.beans.factory.annotation.Autowired;
import java.sql.SQLException;
import java.util.List;

/**
 *
 * Implementation of the project member service.
 *
 * @author Laurentiu Marcut
 */
public class MemberProjectServiceImpl implements MemberProjectService {

    @Autowired
    private MemberProjectRepository memberProjectRepository;

    @Override
    public List<Member> selectAll(String project) throws SQLException {
        return this.memberProjectRepository.selectAll(project);
    }

    @Override
    public Member select(String project, String member) throws SQLException {
        return this.memberProjectRepository.select(project, member);
    }

    @Override
    public void insert(String project, String member, String role) throws SQLException {
        this.memberProjectRepository.insert(project, member, role);
    }

    @Override
    public void delete(String project, String member) throws SQLException {
        this.memberProjectRepository.delete(project, member);
    }
}
