gt: 		if (getPrimaryKey() == primaryKey) {
context: /**
   * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
   *
   * This library is free software; you can redistribute it and/or modify it under
   * the terms of the GNU Lesser General Public License as published by the Free
   * Software Foundation; either version 2.1 of the License, or (at your option)
   * any later version.
   *
   * This library is distributed in the hope that it will be useful, but WITHOUT
   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
   * details.
   */
  
  package com.iucn.whp.dbservice.model.impl;
  
  import com.iucn.whp.dbservice.model.whp_sites_contacts;
  import com.iucn.whp.dbservice.model.whp_sites_contactsModel;
  
  import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler;
  import com.liferay.portal.kernel.util.GetterUtil;
  import com.liferay.portal.kernel.util.ProxyUtil;
  import com.liferay.portal.kernel.util.StringBundler;
  import com.liferay.portal.model.CacheModel;
  import com.liferay.portal.model.impl.BaseModelImpl;
  import com.liferay.portal.service.ServiceContext;
  
  import com.liferay.portlet.expando.model.ExpandoBridge;
  import com.liferay.portlet.expando.util.ExpandoBridgeFactoryUtil;
  
  import java.io.Serializable;
  
  import java.sql.Types;
  
  import java.util.HashMap;
  import java.util.Map;
  
  /**
   * The base model implementation for the whp_sites_contacts service. Represents a row in the &quot;whp_whp_sites_contacts&quot; database table, with each column mapped to a property of this class.
   *
   * <p>
   * This implementation and its corresponding interface {@link com.iucn.whp.dbservice.model.whp_sites_contactsModel} exist only as a container for the default property accessors generated by ServiceBuilder. Helper methods and all application logic should be put in {@link whp_sites_contactsImpl}.
   * </p>
   *
   * @author alok.sen
   * @see whp_sites_contactsImpl
   * @see com.iucn.whp.dbservice.model.whp_sites_contacts
   * @see com.iucn.whp.dbservice.model.whp_sites_contactsModel
   * @generated
   */
  public class whp_sites_contactsModelImpl extends BaseModelImpl<whp_sites_contacts>
  	implements whp_sites_contactsModel {
  	/*
  	 * NOTE FOR DEVELOPERS:
  	 *
  	 * Never modify or reference this class directly. All methods that expect a whp_sites_contacts model instance should use the {@link com.iucn.whp.dbservice.model.whp_sites_contacts} interface instead.
  	 */
  	public static final String TABLE_NAME = "whp_whp_sites_contacts";
  	public static final Object[][] TABLE_COLUMNS = {
  			{ "whp_sites_contacts_id", Types.BIGINT },
  			{ "site_id", Types.BIGINT },
  			{ "contactid", Types.INTEGER }
  		};
  	public static final String TABLE_SQL_CREATE = "create table whp_whp_sites_contacts (whp_sites_contacts_id LONG not null primary key,site_id LONG,contactid INTEGER)";
  	public static final String TABLE_SQL_DROP = "drop table whp_whp_sites_contacts";
  	public static final String DATA_SOURCE = "liferayDataSource";
  	public static final String SESSION_FACTORY = "liferaySessionFactory";
  	public static final String TX_MANAGER = "liferayTransactionManager";
  	public static final boolean ENTITY_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get(
  				"value.object.entity.cache.enabled.com.iucn.whp.dbservice.model.whp_sites_contacts"),
  			true);
  	public static final boolean FINDER_CACHE_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get(
  				"value.object.finder.cache.enabled.com.iucn.whp.dbservice.model.whp_sites_contacts"),
  			true);
  	public static final boolean COLUMN_BITMASK_ENABLED = GetterUtil.getBoolean(com.liferay.util.service.ServiceProps.get(
  				"value.object.column.bitmask.enabled.com.iucn.whp.dbservice.model.whp_sites_contacts"),
  			true);
  	public static long CONTACTID_COLUMN_BITMASK = 1L;
  	public static long SITE_ID_COLUMN_BITMASK = 2L;
  	public static final long LOCK_EXPIRATION_TIME = GetterUtil.getLong(com.liferay.util.service.ServiceProps.get(
  				"lock.expiration.time.com.iucn.whp.dbservice.model.whp_sites_contacts"));
  
  	public whp_sites_contactsModelImpl() {
  	}
  
  	public long getPrimaryKey() {
  		return _whp_sites_contacts_id;
  	}
  
  	public void setPrimaryKey(long primaryKey) {
  		setWhp_sites_contacts_id(primaryKey);
  	}
  
  	public Serializable getPrimaryKeyObj() {
  		return new Long(_whp_sites_contacts_id);
  	}
  
  	public void setPrimaryKeyObj(Serializable primaryKeyObj) {
  		setPrimaryKey(((Long)primaryKeyObj).longValue());
  	}
  
  	public Class<?> getModelClass() {
  		return whp_sites_contacts.class;
  	}
  
  	public String getModelClassName() {
  		return whp_sites_contacts.class.getName();
  	}
  
  	@Override
  	public Map<String, Object> getModelAttributes() {
  		Map<String, Object> attributes = new HashMap<String, Object>();
  
  		attributes.put("whp_sites_contacts_id", getWhp_sites_contacts_id());
  		attributes.put("site_id", getSite_id());
  		attributes.put("contactid", getContactid());
  
  		return attributes;
  	}
  
  	@Override
  	public void setModelAttributes(Map<String, Object> attributes) {
  		Long whp_sites_contacts_id = (Long)attributes.get(
  				"whp_sites_contacts_id");
  
  		if (whp_sites_contacts_id != null) {
  			setWhp_sites_contacts_id(whp_sites_contacts_id);
  		}
  
  		Long site_id = (Long)attributes.get("site_id");
  
  		if (site_id != null) {
  			setSite_id(site_id);
  		}
  
  		Integer contactid = (Integer)attributes.get("contactid");
  
  		if (contactid != null) {
  			setContactid(contactid);
  		}
  	}
  
  	public long getWhp_sites_contacts_id() {
  		return _whp_sites_contacts_id;
  	}
  
  	public void setWhp_sites_contacts_id(long whp_sites_contacts_id) {
  		_whp_sites_contacts_id = whp_sites_contacts_id;
  	}
  
  	public long getSite_id() {
  		return _site_id;
  	}
  
  	public void setSite_id(long site_id) {
  		_columnBitmask |= SITE_ID_COLUMN_BITMASK;
  
  		if (!_setOriginalSite_id) {
  			_setOriginalSite_id = true;
  
  			_originalSite_id = _site_id;
  		}
  
  		_site_id = site_id;
  	}
  
  	public long getOriginalSite_id() {
  		return _originalSite_id;
  	}
  
  	public int getContactid() {
  		return _contactid;
  	}
  
  	public void setContactid(int contactid) {
  		_columnBitmask |= CONTACTID_COLUMN_BITMASK;
  
  		if (!_setOriginalContactid) {
  			_setOriginalContactid = true;
  
  			_originalContactid = _contactid;
  		}
  
  		_contactid = contactid;
  	}
  
  	public int getOriginalContactid() {
  		return _originalContactid;
  	}
  
  	public long getColumnBitmask() {
  		return _columnBitmask;
  	}
  
  	@Override
  	public ExpandoBridge getExpandoBridge() {
  		return ExpandoBridgeFactoryUtil.getExpandoBridge(0,
  			whp_sites_contacts.class.getName(), getPrimaryKey());
  	}
  
  	@Override
  	public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
  		ExpandoBridge expandoBridge = getExpandoBridge();
  
  		expandoBridge.setAttributes(serviceContext);
  	}
  
  	@Override
  	public whp_sites_contacts toEscapedModel() {
  		if (_escapedModelProxy == null) {
  			_escapedModelProxy = (whp_sites_contacts)ProxyUtil.newProxyInstance(_classLoader,
  					_escapedModelProxyInterfaces,
  					new AutoEscapeBeanHandler(this));
  		}
  
  		return _escapedModelProxy;
  	}
  
  	@Override
  	public Object clone() {
  		whp_sites_contactsImpl whp_sites_contactsImpl = new whp_sites_contactsImpl();
  
  		whp_sites_contactsImpl.setWhp_sites_contacts_id(getWhp_sites_contacts_id());
  		whp_sites_contactsImpl.setSite_id(getSite_id());
  		whp_sites_contactsImpl.setContactid(getContactid());
  
  		whp_sites_contactsImpl.resetOriginalValues();
  
  		return whp_sites_contactsImpl;
  	}
  
  	public int compareTo(whp_sites_contacts whp_sites_contacts) {
  		long primaryKey = whp_sites_contacts.getPrimaryKey();
  
  		if (getPrimaryKey() < primaryKey) {
  			return -1;
  		}
  		else if (getPrimaryKey() > primaryKey) {
  			return 1;
  		}
  		else {
  			return 0;
  		}
  	}
  
  	@Override
  	public boolean equals(Object obj) {
  		if (obj == null) {
  			return false;
  		}
  
  		whp_sites_contacts whp_sites_contacts = null;
  
  		try {
  			whp_sites_contacts = (whp_sites_contacts)obj;
  		}
  		catch (ClassCastException cce) {
  			return false;
  		}
  
  		long primaryKey = whp_sites_contacts.getPrimaryKey();
  
  