Michael Chera is a professional with experience in both sales and founding. Michael has been a Co-Founder at CultureFly LLC since 2016 and previously worked in Sales at Isaac Morris Ltd.
package com.example.demo.service;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.example.demo.model.Employee;
import com.example.demo.repository.EmployeeRepository;
@Service
public class EmployeeService {
@Autowired
private EmployeeRepository employeeRepository;
public Employee save(Employee employee) {
return employeeRepository.save(employee);
}
public List<Employee> findAll(){
return employeeRepository.findAll();
}
public Employee findOne(Long id) {
return employeeRepository.findOne(id);
}
public void delete(Employee employee) {
employeeRepository.delete(employee);
}
public List<Employee> findByName(String name){
return employeeRepository.findByName(name);
}
public List<Employee> findByNameAndSalary(String name, Double salary){
return employeeRepository.findByNameAndSalary(name, salary);
}
public List<Employee> findByNameAndSalaryGreaterThan(String name, Double salary){
return employeeRepository.findByNameAndSalaryGreaterThan(name, salary);
}
public List<Employee> findBySalaryBetween(Double min, Double max){
return employeeRepository.findBySalaryBetween(min, max);
}
public List<Employee> findByNameLike(String name){
return employeeRepository.findByNameLike(name);
}
public List<Employee> findByNameNot(String name){
return employeeRepository.findByNameNot(name);
}
public List<Employee> findByNameOrderBySalaryDesc(String name){
return employeeRep
October, 2016 - present