package com.repository;

import com.entity.Member;
import org.springframework.stereotype.Repository;
import java.sql.SQLException;
import java.util.List;

/**
 *
 * Interface repository for the project member.
 *
 * @author Laurentiu Marcut
 */
@Repository
public interface MemberProjectRepository {

    /**
     *
     * Select all project members.
     *
     * @param project
     * @return project members
     * @throws SQLException
     */
    List<Member> selectAll(String project) throws SQLException;

    /**
     *
     * Select member by email.
     *
     * @param project
     * @param member
     * @return project member
     * @throws SQLException
     */
    Member select(String project, String member) throws SQLException;

    /**
     *
     * Insert project member.
     *
     * @param project
     * @param member
     * @param role
     * @throws SQLException
     */
    void insert(String project, String member, String role) throws SQLException;

    /**
     *
     * Delete project member.
     *
     * @param project
     * @param member
     * @throws SQLException
     */
    void delete(String project, String member) throws SQLException;
}
