StudentServiceInt.java
package com.sunilos.proj0.service;
import java.util.List;
import com.sunilos.proj0.dto.StudentDTO;
/**
* Session facade of Student Service. It is transactional, apply delcarative
* transactions with help of Spring AOP.
*
* If unchecked exception is propagated from a method then declarative
* transaction is rolled back by Spring AOP.
*
* @author SunilOS
* @version 1.0
* @Copyright (c) SunilOS
*/
public interface StudentServiceInt {
/**
* Adds a Student
*
* @param dto
* @return
*/
public long add(StudentDTO dto);
/**
* Updates a Student
*
* @param dto
* @return
*/
public long update(StudentDTO dto);
/**
* Deletes a Student
*
* @param id
*/
public void delete(long id);
/**
* Finds Student by Email
*
* @param email
* @return
*/
public StudentDTO findByEmail(String email);
/**
* Finds Student by PK
*
* @param pk
* @return
*/
public StudentDTO findByPK(long pk);
/**
* Searches Students with pagination
*
* @return list : List of Students
* @param dto
* : Search Parameters
* @param pageNo
* : Current Page No.
* @param pageSize
* : Size of Page
*/
public List search(StudentDTO dto, int pageNo, int pageSize);
/**
* Searches Students
*
* @return list : List of Students
* @param dto
* : Search Parameters
*/
public List search(StudentDTO dto);
}