/* * 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; /** * ZonesToGeoZones generated by hbm2java */ public class ZoneToGeoZone implements java.io.Serializable { // Fields private long associationId; private int merchantId; private int zoneCountryId; private Integer zoneId; private Long geoZoneId; private Date lastModified; private Date dateAdded; private GeoZone geoZone; public GeoZone getGeoZone() { return geoZone; } public void setGeoZone(GeoZone geoZone) { this.geoZone = geoZone; } private void initialize() { Date date = new Date(); lastModified = new Date(date.getTime()); dateAdded = new Date(date.getTime()); } // Constructors /** default constructor */ public ZoneToGeoZone() { initialize(); } /** minimal constructor */ public ZoneToGeoZone(long associationId, int merchantId, int zoneCountryId, Date dateAdded) { this.associationId = associationId; this.merchantId = merchantId; this.zoneCountryId = zoneCountryId; this.dateAdded = dateAdded; } /** full constructor */ public ZoneToGeoZone(long associationId, int merchantId, int zoneCountryId, Integer zoneId, Long geoZoneId, Date lastModified, Date dateAdded) { this.associationId = associationId; this.merchantId = merchantId; this.zoneCountryId = zoneCountryId; this.zoneId = zoneId; this.geoZoneId = geoZoneId; this.lastModified = lastModified; this.dateAdded = dateAdded; } // Property accessors public long getAssociationId() { return this.associationId; } public void setAssociationId(long associationId) { this.associationId = associationId; } public int getMerchantId() { return this.merchantId; } public void setMerchantId(int merchantId) { this.merchantId = merchantId; } public int getZoneCountryId() { return this.zoneCountryId; } public void setZoneCountryId(int zoneCountryId) { this.zoneCountryId = zoneCountryId; } public Integer getZoneId() { return this.zoneId; } public void setZoneId(Integer zoneId) { this.zoneId = zoneId; } public Long getGeoZoneId() { return this.geoZoneId; } public void setGeoZoneId(Long geoZoneId) { this.geoZoneId = geoZoneId; } 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 + (int) (associationId ^ (associationId >>> 32)); result = PRIME * result + ((dateAdded == null) ? 0 : dateAdded.hashCode()); result = PRIME * result + ((geoZoneId == null) ? 0 : geoZoneId.hashCode()); result = PRIME * result + ((lastModified == null) ? 0 : lastModified.hashCode()); result = PRIME * result + merchantId; result = PRIME * result + zoneCountryId; result = PRIME * result + ((zoneId == null) ? 0 : zoneId.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; final ZoneToGeoZone other = (ZoneToGeoZone) obj; if (associationId != other.associationId) return false; if (dateAdded == null) { if (other.dateAdded != null) return false; } else if (!dateAdded.equals(other.dateAdded)) return false; if (geoZoneId == null) { if (other.geoZoneId != null) return false; } else if (!geoZoneId.equals(other.geoZoneId)) 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; if (zoneCountryId != other.zoneCountryId) return false; if (zoneId == null) { if (other.zoneId != null) return false; } else if (!zoneId.equals(other.zoneId)) return false; return true; } }