mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-17 21:15:50 +00:00
Add extended repository interfaces
This commit is contained in:
parent
539fb14320
commit
dafa2772de
6 changed files with 99 additions and 0 deletions
|
@ -0,0 +1,15 @@
|
||||||
|
package org.springframework.samples.petclinic.repository;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import org.springframework.dao.DataAccessException;
|
||||||
|
import org.springframework.samples.petclinic.model.Owner;
|
||||||
|
|
||||||
|
public interface OwnerRepositoryExt extends OwnerRepository {
|
||||||
|
|
||||||
|
Collection<Owner> findAll() throws DataAccessException;
|
||||||
|
|
||||||
|
void delete(Owner owner) throws DataAccessException;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,14 @@
|
||||||
|
package org.springframework.samples.petclinic.repository;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import org.springframework.dao.DataAccessException;
|
||||||
|
import org.springframework.samples.petclinic.model.Pet;
|
||||||
|
|
||||||
|
public interface PetRepositoryExt extends PetRepository {
|
||||||
|
|
||||||
|
Collection<Pet> findAll() throws DataAccessException;
|
||||||
|
|
||||||
|
void delete(Pet pet) throws DataAccessException;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,18 @@
|
||||||
|
package org.springframework.samples.petclinic.repository;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import org.springframework.dao.DataAccessException;
|
||||||
|
import org.springframework.samples.petclinic.model.PetType;
|
||||||
|
|
||||||
|
public interface PetTypeRepositoryExt {
|
||||||
|
|
||||||
|
PetType findById(int id);
|
||||||
|
|
||||||
|
Collection<PetType> findAll() throws DataAccessException;
|
||||||
|
|
||||||
|
void save(PetType petType) throws DataAccessException;
|
||||||
|
|
||||||
|
void delete(PetType petType) throws DataAccessException;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,18 @@
|
||||||
|
package org.springframework.samples.petclinic.repository;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import org.springframework.dao.DataAccessException;
|
||||||
|
import org.springframework.samples.petclinic.model.Specialty;
|
||||||
|
|
||||||
|
public interface SpecialtyRepositoryExt {
|
||||||
|
|
||||||
|
Specialty findById(int id);
|
||||||
|
|
||||||
|
Collection<Specialty> findAll() throws DataAccessException;
|
||||||
|
|
||||||
|
void save(Specialty specialty) throws DataAccessException;
|
||||||
|
|
||||||
|
void delete(Specialty specialty) throws DataAccessException;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,18 @@
|
||||||
|
package org.springframework.samples.petclinic.repository;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import org.springframework.dao.DataAccessException;
|
||||||
|
import org.springframework.samples.petclinic.model.Vet;
|
||||||
|
|
||||||
|
public interface VetRepositoryExt extends VetRepository {
|
||||||
|
|
||||||
|
Vet findById(int id) throws DataAccessException;
|
||||||
|
|
||||||
|
Collection<Vet> findAll() throws DataAccessException;
|
||||||
|
|
||||||
|
void save(Vet vet) throws DataAccessException;
|
||||||
|
|
||||||
|
void delete(Vet vet) throws DataAccessException;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,16 @@
|
||||||
|
package org.springframework.samples.petclinic.repository;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import org.springframework.dao.DataAccessException;
|
||||||
|
import org.springframework.samples.petclinic.model.Visit;
|
||||||
|
|
||||||
|
public interface VisitRepositoryExt extends VisitRepository {
|
||||||
|
|
||||||
|
Visit findById(int id) throws DataAccessException;
|
||||||
|
|
||||||
|
Collection<Visit> findAll() throws DataAccessException;
|
||||||
|
|
||||||
|
void delete(Visit visit) throws DataAccessException;
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in a new issue