001 // Copyright 2009 by Basil Vandegriend. All rights reserved.
002
003 package com.basilv.examples.spring.autowire;
004
005 import org.springframework.beans.factory.annotation.Autowired;
006
007 import com.basilv.examples.spring.*;
008
009 public class CalculatorServiceImpl implements CalculatorService
010 {
011 @Autowired
012 private ResumeRepository resumeRepository;
013
014
015 public boolean validate(Resume resume) {
016 for (Resume repoResume : resumeRepository.findAll()) {
017 if (repoResume.getName().equals(resume.getName())) {
018 return true;
019 }
020 }
021
022 return false;
023 }
024
025 public void setResumeRepository(ResumeRepository resumeRepository) {
026 this.resumeRepository = resumeRepository;
027 }
028 }