Subversion Repositories SmartDukaan

Rev

Rev 24349 | Rev 31860 | 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.inventory;

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

@Entity
@Table(name="inventory.statemaster", schema = "inventory")
public class State {
        @Id
        @Column
        private int id;


        @Column(name="name")
        private String name;
        
        @Column(name="stateCode")
        private String code;
        
        @Column
        private String shortName;
        
        

        
        public String getCode() {
                return code;
        }


        public void setCode(String code) {
                this.code = code;
        }


        @Override
        public int hashCode() {
                final int prime = 31;
                int result = 1;
                result = prime * result + ((code == null) ? 0 : code.hashCode());
                result = prime * result + id;
                result = prime * result + ((name == null) ? 0 : name.hashCode());
                result = prime * result + ((shortName == null) ? 0 : shortName.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;
                State other = (State) obj;
                if (code == null) {
                        if (other.code != null)
                                return false;
                } else if (!code.equals(other.code))
                        return false;
                if (id != other.id)
                        return false;
                if (name == null) {
                        if (other.name != null)
                                return false;
                } else if (!name.equals(other.name))
                        return false;
                if (shortName == null) {
                        if (other.shortName != null)
                                return false;
                } else if (!shortName.equals(other.shortName))
                        return false;
                return true;
        }


        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 getShortName() {
                return shortName;
        }


        public void setShortName(String shortName) {
                this.shortName = shortName;
        }


        @Override
        public String toString() {
                return "State [id=" + id + ", name=" + name + ", code=" + code + ", shortName=" + shortName + "]";
        }
        
        
}