package com.hotels.services;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hotels.models.Hotel;
import com.hotels.repositories.HotelRepository;
import java.util.List;

@Service
public class HotelServiceImpl implements HotelService {
    @Autowired
    private HotelRepository repository;

    @Override
    public Hotel save(Hotel entity) {
        return this.repository.save(entity);
    }

    @Override
    public List<Hotel> getAll() {
        return this.repository.findAll();
    }

    @Override
    public Hotel getById(Long id) {
        return this.repository.findOne(id);
    }

    @Override
    public void delete(Long id) {
        this.repository.delete(id);
    }
}

@@ -11,16 +11,24 @@
 m.hotels
+amdrooms
 .service
@@ -162,16 +162,24 @@
 m.hotels
+amdrooms
 .models.
@@ -203,16 +203,24 @@
 m.hotels
+amdrooms
 .reposit

Update HotelServiceImpl.java