Skip to content

Instantly share code, notes, and snippets.

@sandeepmchouhan111293
Created January 18, 2017 02:05
Show Gist options
  • Save sandeepmchouhan111293/4d2f233761801333d2bfe811d41e9260 to your computer and use it in GitHub Desktop.
Save sandeepmchouhan111293/4d2f233761801333d2bfe811d41e9260 to your computer and use it in GitHub Desktop.
package com.cg.mms.beans;
import java.time.LocalDate;
public class MobilData
{
//Variable Declaration Block
private String custName;
private String mailId;
private double phoneNumber;
private int mobileId;
private int purchaseId;
private LocalDate purchaseDate;
//Getters and Setters Block
public String getCustName() {
return custName;
}
public void setCustName(String custName) {
this.custName = custName;
}
public String getMailId() {
return mailId;
}
public void setMailId(String mailId) {
this.mailId = mailId;
}
public double getPhoneNumber() {
return phoneNumber;
}
public void setPhoneNumber(double phoneNumber) {
this.phoneNumber = phoneNumber;
}
public int getMobileId() {
return mobileId;
}
public void setMobileId(int mobileId) {
this.mobileId = mobileId;
}
public int getPurchaseId() {
return purchaseId;
}
public void setPurchaseId(int purchaseId) {
this.purchaseId = purchaseId;
}
public LocalDate getPurchaseDate() {
return purchaseDate;
}
public void setPurchaseDate(LocalDate purchaseDate) {
this.purchaseDate = purchaseDate;
}
//Constructors Block
public MobilData() {
super();
// TODO Auto-generated constructor stub
}
public MobilData(String custName, String mailId, double phoneNumber,
int mobileId, int purchaseId, LocalDate purchaseDate) {
super();
this.custName = custName;
this.mailId = mailId;
this.phoneNumber = phoneNumber;
this.mobileId = mobileId;
this.purchaseId = purchaseId;
this.purchaseDate = purchaseDate;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result
+ ((custName == null) ? 0 : custName.hashCode());
result = prime * result + ((mailId == null) ? 0 : mailId.hashCode());
result = prime * result + mobileId;
long temp;
temp = Double.doubleToLongBits(phoneNumber);
result = prime * result + (int) (temp ^ (temp >>> 32));
result = prime * result
+ ((purchaseDate == null) ? 0 : purchaseDate.hashCode());
result = prime * result + purchaseId;
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
MobilData other = (MobilData) obj;
if (custName == null) {
if (other.custName != null)
return false;
} else if (!custName.equals(other.custName))
return false;
if (mailId == null) {
if (other.mailId != null)
return false;
} else if (!mailId.equals(other.mailId))
return false;
if (mobileId != other.mobileId)
return false;
if (Double.doubleToLongBits(phoneNumber) != Double
.doubleToLongBits(other.phoneNumber))
return false;
if (purchaseDate == null) {
if (other.purchaseDate != null)
return false;
} else if (!purchaseDate.equals(other.purchaseDate))
return false;
if (purchaseId != other.purchaseId)
return false;
return true;
}
@Override
public String toString() {
return "MobilData [custName=" + custName + ", mailId=" + mailId
+ ", phoneNumber=" + phoneNumber + ", mobileId=" + mobileId
+ ", purchaseId=" + purchaseId + ", purchaseDate="
+ purchaseDate + "]";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment