/*
* Licensed to csti consulting
* You may obtain a copy of the License at
*
* http://www.csticonsulting.com
* Copyright (c) 2006-Aug 24, 2010 Consultation CS-TI inc.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package com.salesmanager.core.entity.reference;
// Generated Sep 4, 2008 8:23:32 PM by Hibernate Tools 3.2.0.beta8
import java.util.Date;
/**
* GeoZones generated by hbm2java
*/
public class GeoZone implements java.io.Serializable {
// Fields
private long geoZoneId;
private int merchantId;
private String geoZoneName;
private String geoZoneDescription;
private Date lastModified;
private Date dateAdded;
private void initialize() {
Date date = new Date();
lastModified = new Date(date.getTime());
dateAdded = new Date(date.getTime());
geoZoneDescription = "";
}
// Constructors
/** default constructor */
public GeoZone() {
initialize();
}
/** minimal constructor */
public GeoZone(long geoZoneId, int merchantId, String geoZoneName,
String geoZoneDescription, Date dateAdded) {
this.geoZoneId = geoZoneId;
this.merchantId = merchantId;
this.geoZoneName = geoZoneName;
this.geoZoneDescription = geoZoneDescription;
this.dateAdded = dateAdded;
}
/** full constructor */
public GeoZone(long geoZoneId, int merchantId, String geoZoneName,
String geoZoneDescription, Date lastModified, Date dateAdded) {
this.geoZoneId = geoZoneId;
this.merchantId = merchantId;
this.geoZoneName = geoZoneName;
this.geoZoneDescription = geoZoneDescription;
this.lastModified = lastModified;
this.dateAdded = dateAdded;
}
// Property accessors
public long getGeoZoneId() {
return this.geoZoneId;
}
public void setGeoZoneId(long geoZoneId) {
this.geoZoneId = geoZoneId;
}
public int getMerchantId() {
return this.merchantId;
}
public void setMerchantId(int merchantId) {
this.merchantId = merchantId;
}
public String getGeoZoneName() {
return this.geoZoneName;
}
public void setGeoZoneName(String geoZoneName) {
this.geoZoneName = geoZoneName;
}
public String getGeoZoneDescription() {
return this.geoZoneDescription;
}
public void setGeoZoneDescription(String geoZoneDescription) {
this.geoZoneDescription = geoZoneDescription;
}
public Date getLastModified() {
return this.lastModified;
}
public void setLastModified(Date lastModified) {
this.lastModified = lastModified;
}
public Date getDateAdded() {
return this.dateAdded;
}
public void setDateAdded(Date dateAdded) {
this.dateAdded = dateAdded;
}
@Override
public int hashCode() {
final int PRIME = 31;
int result = 1;
result = PRIME * result
+ ((dateAdded == null) ? 0 : dateAdded.hashCode());
result = PRIME
* result
+ ((geoZoneDescription == null) ? 0 : geoZoneDescription
.hashCode());
result = PRIME * result + (int) (geoZoneId ^ (geoZoneId >>> 32));
result = PRIME * result
+ ((geoZoneName == null) ? 0 : geoZoneName.hashCode());
result = PRIME * result
+ ((lastModified == null) ? 0 : lastModified.hashCode());
result = PRIME * result + merchantId;
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
final GeoZone other = (GeoZone) obj;
if (dateAdded == null) {
if (other.dateAdded != null)
return false;
} else if (!dateAdded.equals(other.dateAdded))
return false;
if (geoZoneDescription == null) {
if (other.geoZoneDescription != null)
return false;
} else if (!geoZoneDescription.equals(other.geoZoneDescription))
return false;
if (geoZoneId != other.geoZoneId)
return false;
if (geoZoneName == null) {
if (other.geoZoneName != null)
return false;
} else if (!geoZoneName.equals(other.geoZoneName))
return false;
if (lastModified == null) {
if (other.lastModified != null)
return false;
} else if (!lastModified.equals(other.lastModified))
return false;
if (merchantId != other.merchantId)
return false;
return true;
}
}