changed details
This commit is contained in:
parent
f0a411c031
commit
9aa425d1c3
@ -4,31 +4,24 @@ import org.springframework.stereotype.Service;
|
|||||||
import ovh.herisson.Clyde.Repositories.InscriptionRepository;
|
import ovh.herisson.Clyde.Repositories.InscriptionRepository;
|
||||||
import ovh.herisson.Clyde.Tables.InscriptionRequest;
|
import ovh.herisson.Clyde.Tables.InscriptionRequest;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class InscriptionService {
|
public class InscriptionService {
|
||||||
|
|
||||||
InscriptionRepository incriptionRepo;
|
InscriptionRepository inscriptionRepo;
|
||||||
public void save(InscriptionRequest inscriptionRequest){
|
|
||||||
incriptionRepo.save(inscriptionRequest);
|
|
||||||
}
|
|
||||||
|
|
||||||
public InscriptionService(InscriptionRepository inscriptionRepo){
|
public InscriptionService(InscriptionRepository inscriptionRepo){
|
||||||
this.incriptionRepo = inscriptionRepo;
|
this.inscriptionRepo = inscriptionRepo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void save(InscriptionRequest inscriptionRequest){
|
||||||
|
inscriptionRepo.save(inscriptionRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
public InscriptionRequest getById(long id){
|
public InscriptionRequest getById(long id){
|
||||||
InscriptionRequest inscriptionRequest = incriptionRepo.findById(id);
|
return inscriptionRepo.findById(id);
|
||||||
|
|
||||||
if (inscriptionRequest == null){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return inscriptionRequest;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Iterable<InscriptionRequest> getAll(){
|
public Iterable<InscriptionRequest> getAll(){
|
||||||
return incriptionRepo.findAll();
|
return inscriptionRepo.findAll();
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user