Subversion Repositories SmartDukaan

Rev

Rev 26299 | Rev 28825 | 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.time.LocalDateTime;

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

@Entity
@Table(name = "fofo.activated_imei", schema = "fofo")
public class ActivatedImei {
        @Id
        @Column(name = "serial_number", unique = true)
        private String serialNumber;
        
        @Column(name = "activation_timestamp")
        private LocalDateTime activationTimestamp;

        @Column(name = "create_timestamp")
        private LocalDateTime createTimestamp;
        
        public ActivatedImei() {
                super();
        }
        
        public ActivatedImei(String serialNumber, LocalDateTime activationTimestamp) {
                this.activationTimestamp = activationTimestamp;
                this.serialNumber = serialNumber;
        }

        @Override
        public String toString() {
                return "ActivatedImei [serialNumber=" + serialNumber + ", activationTimestamp=" + activationTimestamp
                                + ", createTimestamp=" + createTimestamp + "]";
        }

        public String getSerialNumber() {
                return serialNumber;
        }

        public void setSerialNumber(String serialNumber) {
                this.serialNumber = serialNumber;
        }

        public LocalDateTime getActivationTimestamp() {
                return activationTimestamp;
        }

        public void setActivationTimestamp(LocalDateTime activationTimestamp) {
                this.activationTimestamp = activationTimestamp;
        }
        
        

        public LocalDateTime getCreateTimestamp() {
                return createTimestamp;
        }

        public void setCreateTimestamp(LocalDateTime createTimestamp) {
                this.createTimestamp = createTimestamp;
        }

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

}