// Path: src/main/java/cn/com/chenyixiao/rrs/dao/RestaurantFoodDAO.java
// public interface RestaurantFoodDAO {
// 
// 	public void addRestaurantFood(RestaurantFood restaurantFood);
// 	public void updateRestaurantFood(RestaurantFood restaurantFood);
// 	public RestaurantFood getRestaurantFood(Long id);
// 	public List<RestaurantFood> getAllRestaurantFoods();
// 	public void deleteRestaurantFood(Long id);
// 	public void deleteAllRestaurantFood();
// 	
// 	public Long count();
// 	
// 	public List<RestaurantFood> getRestaurantFoodsByRestaurantId(Long restaurantId);
// }
// 
// Path: src/main/java/cn/com/chenyixiao/rrs/entity/RestaurantFood.java
// @Entity
// @Table(name = "restaurant_food", catalog = "rrs")
// public class RestaurantFood {
// 	private long id;
// 	private long restaurantId;
// 	private long foodId;
// 	
// 	
// 	public RestaurantFood() {
// 	}
// 
// 
// 	public RestaurantFood(long id, long restaurantId, long foodId) {
// 		this.id = id;
// 		this.restaurantId = restaurantId;
// 		this.foodId = foodId;
// 	}
// 	
// 	
// 	@Id
// 	@GeneratedValue(strategy = GenerationType.IDENTITY)
// 	@Column(name = "id", unique = true, nullable = false)
// 	public long getId() {
// 		return id;
// 	}
// 	public void setId(long id) {
// 		this.id = id;
// 	}
// 	
// 	@Column(name = "restaurant_id")
// 	public long getRestaurantId() {
// 		return restaurantId;
// 	}
// 	public void setRestaurantId(long restaurantId) {
// 		this.restaurantId = restaurantId;
// 	}
// 	
// 	@Column(name = "food_id")
// 	public long getFoodId() {
// 		return foodId;
// 	}
// 	public void setFoodId(long foodId) {
// 		this.foodId = foodId;
// 	}
// 	
// 	
// }
// 
// Path: src/main/java/cn/com/chenyixiao/rrs/service/RestaurantFoodService.java
// public interface RestaurantFoodService {
// 
// 	public void addRestaurantFood(RestaurantFood restaurantFood);
// 	public void updateRestaurantFood(RestaurantFood restaurantFood);
// 	public RestaurantFood getRestaurantFood(Long id);
// 	public List<RestaurantFood> getAllRestaurantFoods();
// 	public void deleteRestaurantFood(Long id);
// 	public void deleteAllRestaurantFoods();
// 	
// 	public Long count();
// 	
// 	public List<RestaurantFood> getRestaurantFoodsByRestaurantId(Long restaurantId);
// }


import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import cn.com.chenyixiao.rrs.dao.RestaurantFoodDAO;
import cn.com.chenyixiao.rrs.entity.RestaurantFood;
import cn.com.chenyixiao.rrs.service.RestaurantFoodService;
	public void updateRestaurantFood(RestaurantFood restaurantFood) {
		restaurantFoodDAO.updateRestaurantFood(restaurantFood);
	}

	@Override
	public RestaurantFood getRestaurantFood(Long id) {
		return restaurantFoodDAO.getRestaurantFood(id);
	}

	@Override
	public List<RestaurantFood> getAllRestaurantFoods() {
		return restaurantFoodDAO.getAllRestaurantFoods();
	}

	@Override
	public void deleteRestaurantFood(Long id) {
		restaurantFoodDAO.deleteRestaurantFood(id);
	}

	@Override
	public void deleteAllRestaurantFoods() {
		restaurantFoodDAO.deleteAllRestaurantFood();
	}

	@Override
	public Long count() {
		return restaurantFoodDAO.count();
	}

	@Override
// Path: src/main/java/cn/com/chenyixiao/rrs/dao/RestaurantFoodDAO.java
// public interface RestaurantFoodDAO {
// 
// 	public void addRestaurantFood(RestaurantFood restaurantFood);
// 	public void updateRestaurantFood(RestaurantFood restaurantFood);
// 	public RestaurantFood getRestaurantFood(Long id);
// 	public List<RestaurantFood> getAllRestaurantFoods();
// 	public void deleteRestaurantFood(Long id);
// 	public void deleteAllRestaurantFood();
// 	
// 	public Long count();
// 	
// 	public List<RestaurantFood> getRestaurantFoodsByRestaurantId(Long restaurantId);
// }
// 
// Path: src/main/java/cn/com/chenyixiao/rrs/entity/RestaurantFood.java
// @Entity
// @Table(name = "restaurant_food", catalog = "rrs")
// public class RestaurantFood {
// 	private long id;
// 	private long restaurantId;
// 	private long foodId;
// 	
// 	
// 	public RestaurantFood() {
// 	}
// 
// 
// 	public RestaurantFood(long id, long restaurantId, long foodId) {
// 		this.id = id;
// 		this.restaurantId = restaurantId;
// 		this.foodId = foodId;
// 	}
// 	
// 	
// 	@Id
// 	@GeneratedValue(strategy = GenerationType.IDENTITY)
// 	@Column(name = "id", unique = true, nullable = false)
// 	public long getId() {
// 		return id;
// 	}
// 	public void setId(long id) {
// 		this.id = id;
// 	}
// 	
// 	@Column(name = "restaurant_id")
// 	public long getRestaurantId() {
// 		return restaurantId;
// 	}
// 	public void setRestaurantId(long restaurantId) {
// 		this.restaurantId = restaurantId;
// 	}
// 	
// 	@Column(name = "food_id")
// 	public long getFoodId() {
// 		return foodId;
// 	}
// 	public void setFoodId(long foodId) {
// 		this.foodId = foodId;
// 	}
// 	
// 	
// }
// 
// Path: src/main/java/cn/com/chenyixiao/rrs/service/RestaurantFoodService.java
// public interface RestaurantFoodService {
// 
// 	public void addRestaurantFood(RestaurantFood restaurantFood);
// 	public void updateRestaurantFood(RestaurantFood restaurantFood);
// 	public RestaurantFood getRestaurantFood(Long id);
// 	public List<RestaurantFood> getAllRestaurantFoods();
// 	public void deleteRestaurantFood(Long id);
// 	public void deleteAllRestaurantFoods();
// 	
// 	public Long count();
// 	
// 	public List<RestaurantFood> getRestaurantFoodsByRestaurantId(Long restaurantId);
// }


// Path: src/main/java/cn/com/chenyixiao/rrs/service/impl/RestaurantFoodServiceImpl.java
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import cn.com.chenyixiao.rrs.dao.RestaurantFoodDAO;
import cn.com.chenyixiao.rrs.entity.RestaurantFood;
import cn.com.chenyixiao.rrs.service.RestaurantFoodService;

	public void updateRestaurantFood(RestaurantFood restaurantFood) {
		restaurantFoodDAO.updateRestaurantFood(restaurantFood);
	}

	@Override
	public RestaurantFood getRestaurantFood(Long id) {
		return restaurantFoodDAO.getRestaurantFood(id);
	}

	@Override
	public List<RestaurantFood> getAllRestaurantFoods() {
		return restaurantFoodDAO.getAllRestaurantFoods();
	}

	@Override
	public void deleteRestaurantFood(Long id) {
		restaurantFoodDAO.deleteRestaurantFood(id);
	}

	@Override
	public void deleteAllRestaurantFoods() {
		restaurantFoodDAO.deleteAllRestaurantFood();
	}

	@Override
	public Long count() {
		return restaurantFoodDAO.count();
	}

	@Override
	public List<RestaurantFood> getRestaurantFoodsByRestaurantId(Long restaurantId) {