/**
 * Created by Djidjelly Siclait on 10/8/2016.
 */
package com.clinichelper.Repository;

import com.clinichelper.Entity.Staff;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

public interface StaffRepository extends JpaRepository<Staff, String>{

    Staff findByJascId(String jascId);

    Staff findByStaffEmail(String staffEmail);

    @Query("select s from Staff s where s.staffFirstName = :firstname and s.staffLastName = :lastname")
    List<Staff> findByFirstNameAndLastName(@Param("firstname") String staffFirstName, @Param("lastname") String staffLastName);
}

@@ -296,16 +296,39 @@
 Param;%0A%0A
+import java.util.Date;%0A
 import j
@@ -734,11 +734,201 @@
 stName);
+%0A%0A    @Query(%22select s from Staff s where s.staffBirthDate between :starting and :ending%22)%0A    List%3CStaff%3E findByStaffBirthDateRange(@Param(%22starting%22)Date start, @Param(%22ending%22) Date end);
 %0A%7D%0A

Refactor staffRepository