package at.ac.tuwien.inso.service.impl;

import at.ac.tuwien.inso.entity.*;
import at.ac.tuwien.inso.repository.*;
import at.ac.tuwien.inso.service.*;
import org.springframework.beans.factory.annotation.*;
import org.springframework.stereotype.*;
import org.springframework.transaction.annotation.*;

import javax.persistence.*;
import java.util.*;

@Service
public class UisUserServiceImpl implements UisUserService {

    @Autowired
    private UisUserRepository uisUserRepository;

    @Override
    @Transactional(readOnly = true)
    public List<UisUser> findAllMatching(String searchFilter) {
        return uisUserRepository.findAllMatching(searchFilter);
    }

    @Override
    @Transactional(readOnly = true)
    public UisUser findOne(long id) {
        UisUser user = uisUserRepository.findOne(id);
        if (user == null) {
            throw new EntityNotFoundException("Invalid user id: " + id);
        }

        return user;
    }

    @Override
    @Transactional(readOnly = true)
    public boolean existsUserWithIdentificationNumber(String id) {
        return uisUserRepository.existsByIdentificationNumber(id);
    }
}

@@ -65,24 +65,92 @@
 o.entity.*;%0A
+import at.ac.tuwien.inso.exception.BusinessObjectNotFoundException;%0A
 import at.ac
@@ -366,36 +366,8 @@
 *;%0A%0A
-import javax.persistence.*;%0A
 impo
@@ -899,14 +899,22 @@
 new 
-Entity
+BusinessObject
 NotF

use BusinessObjectNotFoundException