@@ -0,0 +1,1472 @@
+package ca.corefacility.bioinformatics.irida.service.impl;%0A%0Aimport ca.corefacility.bioinformatics.irida.repositories.CRUDRepository;%0Aimport ca.corefacility.bioinformatics.irida.service.CRUDService;%0Aimport java.util.List;%0A%0A/**%0A * A universal CRUD service for all types. Specialized services should extend%0A * this class to get basic CRUD methods for free.%0A *%0A * @author Franklin Bristow %3Cfranklin.bristow@phac-aspc.gc.ca%3E%0A */%0Apublic class CRUDServiceImpl%3CKeyType, Type%3E implements CRUDService%3CKeyType, Type%3E %7B%0A%0A    protected CRUDRepository%3CKeyType, Type%3E repository;%0A%0A    public CRUDServiceImpl(CRUDRepository%3CKeyType, Type%3E repository) %7B%0A        this.repository = repository;%0A    %7D%0A%0A    @Override%0A    public Type create(Type object) throws IllegalArgumentException %7B%0A        //TODO: validate users before creating%0A        return repository.create(object);%0A    %7D%0A%0A    @Override%0A    public Type read(KeyType id) throws IllegalArgumentException %7B%0A        return repository.read(id);%0A    %7D%0A%0A    @Override%0A    public Type update(Type object) throws IllegalArgumentException %7B%0A        //TODO: validate user before updating%0A        return repository.update(object);%0A    %7D%0A%0A    @Override%0A    public void delete(KeyType id) throws IllegalArgumentException %7B%0A        repository.delete(id);%0A    %7D%0A%0A    @Override%0A    public List%3CType%3E list() %7B%0A        return repository.list();%0A    %7D%0A%0A    @Override%0A    public Boolean exists(KeyType id) %7B%0A        return repository.exists(id);%0A    %7D%0A%7D%0A

Add generic service class that can be extended for basic crud support.