package com.service;

import com.entity.SignUpUser;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.sql.SQLException;

/**
 *
 * Interface service for the registration.
 *
 * @author Laurentiu Marcut
 */
@Service
public interface RegistrationService {

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

    /**
     *
     * Insert user.
     *
     * @param user
     * @throws SQLException
     */
    @Transactional
    void insertUser(SignUpUser user) throws SQLException;
}
