Merge branch '88-list-all-timetrack-accounts-for-a-given-user' into 'master'

Resolve "List all Timetrack accounts for a given user"

Closes #88

See merge request marcel.schwarz/2020ss-qbc-geofence-timetracking!68
This commit is contained in:
Marcel Schwarz 2020-05-25 12:26:33 +00:00
commit b20f2e8a61

View File

@ -1,6 +1,8 @@
package de.hft.geotime.repositories;
import de.hft.geotime.entities.TimetrackAccount;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.rest.core.annotation.RepositoryRestResource;
import org.springframework.data.rest.core.annotation.RestResource;
@ -15,4 +17,7 @@ public interface TimetrackAccountRepository extends PagingAndSortingRepository<T
@RestResource(rel = "findByUsernameAndName", path = "findByUsernameAndName")
TimetrackAccount findByUser_UsernameAndName(String username, String account);
@RestResource(rel = "findByUsername", path = "findByUsername")
Page<TimetrackAccount> findAllByUser_Username(String username, Pageable pageable);
}