package com.example.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.example.domain.Shoes;
import com.example.repository.ShoesRepository;

@Service
public class ShoesService {
	@Autowired
	ShoesRepository shoesRepository;
	
	public List<Shoes> findAll(){
		return shoesRepository.findAll();
	}
	
	public Shoes findOne(Integer id){
		return shoesRepository.findOne(id);
	}
	
	public Shoes create(Shoes shoes){
		return shoesRepository.save(shoes);
	}
	
	public Shoes update(Shoes shoes){
		return shoesRepository.save(shoes);
	}
}
