package com.service;

import com.entity.Member;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.sql.SQLException;
import java.util.List;

/**
 *
 * Interface service for the project member.
 *
 * @author Laurentiu Marcut
 */
@Service
public interface MemberProjectService {

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

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

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

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