Subversion Repositories SmartDukaan

Rev

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

package com.spice.profitmandi.dao.entity.fofo;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * This class basically contains payment option details
 * 
 * @author ashikali
 *
 */
@Entity
@Table(name="fofo.payment_option", schema = "fofo")
public class PaymentOption implements Serializable{
        
        private static final long serialVersionUID = 1L;
        
        public PaymentOption() {
        }
        
        @Id
        @Column(name="id")
        @GeneratedValue(strategy = GenerationType.IDENTITY)
        private int id;
        
        @Column(name = "name", unique = true)
        private String name;
        
        @Column(name = "sort_by", unique = true)
        private String sortBy;
        
        public int getId() {
                return id;
        }
        public void setId(int id) {
                this.id = id;
        }
        
        public String getName() {
                return name;
        }
        
        public void setName(String name) {
                this.name = name;
        }
        
        
        
        
        public String getSortBy() {
                return sortBy;
        }
        public void setSortBy(String sortBy) {
                this.sortBy = sortBy;
        }
        @Override
        public int hashCode() {
                final int prime = 31;
                int result = 1;
                result = prime * result + id;
                return result;
        }
        @Override
        public boolean equals(Object obj) {
                if (this == obj)
                        return true;
                if (obj == null)
                        return false;
                if (getClass() != obj.getClass())
                        return false;
                PaymentOption other = (PaymentOption) obj;
                if (id != other.id)
                        return false;
                return true;
        }
        
        @Override
        public String toString() {
                return "PaymentOption [id=" + id + ", name=" + name + "]";
        }
        
        
}