// Path: src/main/java/com/efoodstore/dao/CustomerOrderDao.java
// public interface CustomerOrderDao {
// 
//     void addCustomerOrder(CustomerOrder customerOrder);
// 
// }
// 
// Path: src/main/java/com/efoodstore/model/CustomerOrder.java
// @Entity
// public class CustomerOrder implements Serializable{
// 
//     private static final long serialVersionUID = 2983360377227484514L;
// 
//     @Id
//     @GeneratedValue
//     private int customerOrderId;
// 
//     @OneToOne
//     @JoinColumn(name = "cartId")
//     private Cart cart;
// 
//     @OneToOne
//     @JoinColumn(name = "customerId")
//     private Customer customer;
// 
//     @OneToOne
//     @JoinColumn(name = "billingAddressId")
//     private BillingAddress billingAddress;
// 
//     @OneToOne
//     @JoinColumn(name="shippingAddressId")
//     private ShippingAddress shippingAddress;
// 
//     public int getCustomerOrderId() {
//         return customerOrderId;
//     }
// 
//     public void setCustomerOrderId(int customerOrderId) {
//         this.customerOrderId = customerOrderId;
//     }
// 
//     public Cart getCart() {
//         return cart;
//     }
// 
//     public void setCart(Cart cart) {
//         this.cart = cart;
//     }
// 
//     public Customer getCustomer() {
//         return customer;
//     }
// 
//     public void setCustomer(Customer customer) {
//         this.customer = customer;
//     }
// 
//     public BillingAddress getBillingAddress() {
//         return billingAddress;
//     }
// 
//     public void setBillingAddress(BillingAddress billingAddress) {
//         this.billingAddress = billingAddress;
//     }
// 
//     public ShippingAddress getShippingAddress() {
//         return shippingAddress;
//     }
// 
//     public void setShippingAddress(ShippingAddress shippingAddress) {
//         this.shippingAddress = shippingAddress;
//     }
// }


import com.efoodstore.dao.CustomerOrderDao;
import com.efoodstore.model.CustomerOrder;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;
package com.efoodstore.dao.impl;


@Repository
@Transactional
public class CustomerOrderDaoImpl implements CustomerOrderDao{

        @Autowired
        private SessionFactory sessionFactory;

// Path: src/main/java/com/efoodstore/dao/CustomerOrderDao.java
// public interface CustomerOrderDao {
// 
//     void addCustomerOrder(CustomerOrder customerOrder);
// 
// }
// 
// Path: src/main/java/com/efoodstore/model/CustomerOrder.java
// @Entity
// public class CustomerOrder implements Serializable{
// 
//     private static final long serialVersionUID = 2983360377227484514L;
// 
//     @Id
//     @GeneratedValue
//     private int customerOrderId;
// 
//     @OneToOne
//     @JoinColumn(name = "cartId")
//     private Cart cart;
// 
//     @OneToOne
//     @JoinColumn(name = "customerId")
//     private Customer customer;
// 
//     @OneToOne
//     @JoinColumn(name = "billingAddressId")
//     private BillingAddress billingAddress;
// 
//     @OneToOne
//     @JoinColumn(name="shippingAddressId")
//     private ShippingAddress shippingAddress;
// 
//     public int getCustomerOrderId() {
//         return customerOrderId;
//     }
// 
//     public void setCustomerOrderId(int customerOrderId) {
//         this.customerOrderId = customerOrderId;
//     }
// 
//     public Cart getCart() {
//         return cart;
//     }
// 
//     public void setCart(Cart cart) {
//         this.cart = cart;
//     }
// 
//     public Customer getCustomer() {
//         return customer;
//     }
// 
//     public void setCustomer(Customer customer) {
//         this.customer = customer;
//     }
// 
//     public BillingAddress getBillingAddress() {
//         return billingAddress;
//     }
// 
//     public void setBillingAddress(BillingAddress billingAddress) {
//         this.billingAddress = billingAddress;
//     }
// 
//     public ShippingAddress getShippingAddress() {
//         return shippingAddress;
//     }
// 
//     public void setShippingAddress(ShippingAddress shippingAddress) {
//         this.shippingAddress = shippingAddress;
//     }
// }


// Path: src/main/java/com/efoodstore/dao/impl/CustomerOrderDaoImpl.java
import com.efoodstore.dao.CustomerOrderDao;
import com.efoodstore.model.CustomerOrder;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

package com.efoodstore.dao.impl;


@Repository
@Transactional
public class CustomerOrderDaoImpl implements CustomerOrderDao{

        @Autowired
        private SessionFactory sessionFactory;

        public void addCustomerOrder(CustomerOrder customerOrder) {