Subversion Repositories SmartDukaan

Rev

Rev 24440 | Go to most recent revision | View as "text/plain" | Blame | Compare with Previous | Last modification | View Log | RSS feed

package com.spice.profitmandi.common.model;

import java.util.Set;

public class CreateOrderRequest {
        private CustomCustomer customer;
        private int orderId;
        private Set<CustomFofoOrderItem> fofoOrderItems;
        private Set<CustomPaymentOption> paymentOptions;
        
        
        public void setCustomer(CustomCustomer customer) {
                this.customer = customer;
        }
        public CustomCustomer getCustomer() {
                return customer;
        }
        public int getOrderId() {
                return orderId;
        }
        public void setOrderId(int orderId) {
                this.orderId = orderId;
        }
        @Override
        public int hashCode() {
                final int prime = 31;
                int result = 1;
                result = prime * result + ((customer == null) ? 0 : customer.hashCode());
                result = prime * result + ((fofoOrderItems == null) ? 0 : fofoOrderItems.hashCode());
                result = prime * result + orderId;
                result = prime * result + ((paymentOptions == null) ? 0 : paymentOptions.hashCode());
                return result;
        }
        @Override
        public boolean equals(Object obj) {
                if (this == obj)
                        return true;
                if (obj == null)
                        return false;
                if (getClass() != obj.getClass())
                        return false;
                CreateOrderRequest other = (CreateOrderRequest) obj;
                if (customer == null) {
                        if (other.customer != null)
                                return false;
                } else if (!customer.equals(other.customer))
                        return false;
                if (fofoOrderItems == null) {
                        if (other.fofoOrderItems != null)
                                return false;
                } else if (!fofoOrderItems.equals(other.fofoOrderItems))
                        return false;
                if (orderId != other.orderId)
                        return false;
                if (paymentOptions == null) {
                        if (other.paymentOptions != null)
                                return false;
                } else if (!paymentOptions.equals(other.paymentOptions))
                        return false;
                return true;
        }
        public Set<CustomFofoOrderItem> getFofoOrderItems() {
                return fofoOrderItems;
        }
        public void setFofoOrderItems(Set<CustomFofoOrderItem> fofoLineItems) {
                this.fofoOrderItems = fofoLineItems;
        }
        public Set<CustomPaymentOption> getPaymentOptions() {
                return paymentOptions;
        }
        public void setPaymentOptions(Set<CustomPaymentOption> paymentOptions) {
                this.paymentOptions = paymentOptions;
        }
        
        @Override
        public String toString() {
                return "CreateOrderRequest [customer=" + customer + ", orderId=" + orderId + ", fofoOrderItems="
                                + fofoOrderItems + ", paymentOptions=" + paymentOptions + "]";
        }
        
}