Subversion Repositories SmartDukaan

Rev

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

package com.spice.profitmandi.dao.model;

import java.time.LocalDateTime;

public class TicketViewModel {

        private int id;
        private String categoryName;
        private String subCategoryName;
        private LocalDateTime createdTimestamp;

        public TicketViewModel(int id, String categoryName, String subCategoryName, LocalDateTime createdTimestamp) {
                super();
                this.id = id;
                this.categoryName = categoryName;
                this.subCategoryName = subCategoryName;
                this.createdTimestamp = createdTimestamp;
        }

        public TicketViewModel() {
                super();
                // TODO Auto-generated constructor stub
        }

        public int getId() {
                return id;
        }

        public void setId(int id) {
                this.id = id;
        }

        public String getCategoryName() {
                return categoryName;
        }

        public void setCategoryName(String categoryName) {
                this.categoryName = categoryName;
        }

        public String getSubCategoryName() {
                return subCategoryName;
        }

        public void setSubCategoryName(String subCategoryName) {
                this.subCategoryName = subCategoryName;
        }

        public LocalDateTime getCreatedTimestamp() {
                return createdTimestamp;
        }

        public void setCreatedTimestamp(LocalDateTime createdTimestamp) {
                this.createdTimestamp = createdTimestamp;
        }

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

        @Override
        public String toString() {
                return "TicketViewModel [id=" + id + ", categoryName=" + categoryName + ", subCategoryName=" + subCategoryName
                                + ", createdTimestamp=" + createdTimestamp + "]";
        }

}