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.Tables.InscriptionRequest;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@Service
|
||||
public class InscriptionService {
|
||||
|
||||
InscriptionRepository incriptionRepo;
|
||||
public void save(InscriptionRequest inscriptionRequest){
|
||||
incriptionRepo.save(inscriptionRequest);
|
||||
}
|
||||
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){
|
||||
InscriptionRequest inscriptionRequest = incriptionRepo.findById(id);
|
||||
|
||||
if (inscriptionRequest == null){
|
||||
return null;
|
||||
}
|
||||
return inscriptionRequest;
|
||||
return inscriptionRepo.findById(id);
|
||||
}
|
||||
|
||||
public Iterable<InscriptionRequest> getAll(){
|
||||
return incriptionRepo.findAll();
|
||||
return inscriptionRepo.findAll();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user