package com.repository;

import com.entity.SignUpUser;
import org.springframework.stereotype.Repository;
import java.sql.SQLException;

/**
 *
 * Interface repository for the registration.
 *
 * @author Laurentiu Marcut
 */
@Repository
public interface RegistrationRepository {

    /**
     *
     * Check existing email.
     *
     * @param email
     * @return exists
     * @throws SQLException
     */
    boolean checkEmail(String email) throws SQLException;

    /**
     *
     * Insert new user.
     *
     * @param member
     * @throws SQLException
     */
    void insertUser(SignUpUser member) throws SQLException;

    /**
     *
     * Insert user's role.
     *
     * @param email
     * @param role
     * @throws SQLException
     */
    void insertUserRole(String email, String role) throws SQLException;
}
