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_budget;
  import com.iucn.whp.dbservice.model.whp_sites_budgetModel;
  
  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.kernel.util.StringPool;
  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.Date;
  import java.util.HashMap;
  import java.util.Map;
  
  /**
   * The base model implementation for the whp_sites_budget service. Represents a row in the &quot;whp_whp_sites_budget&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_budgetModel} 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_budgetImpl}.
   * </p>
   *
   * @author alok.sen
   * @see whp_sites_budgetImpl
   * @see com.iucn.whp.dbservice.model.whp_sites_budget
   * @see com.iucn.whp.dbservice.model.whp_sites_budgetModel
   * @generated
   */
  public class whp_sites_budgetModelImpl extends BaseModelImpl<whp_sites_budget>
  	implements whp_sites_budgetModel {
  	/*
  	 * NOTE FOR DEVELOPERS:
  	 *
  	 * Never modify or reference this class directly. All methods that expect a whp_sites_budget model instance should use the {@link com.iucn.whp.dbservice.model.whp_sites_budget} interface instead.
  	 */
  	public static final String TABLE_NAME = "whp_whp_sites_budget";
  	public static final Object[][] TABLE_COLUMNS = {
  			{ "whp_sites_budget_id", Types.BIGINT },
  			{ "site_id", Types.BIGINT },
  			{ "currency_local", Types.DOUBLE },
  			{ "currency_", Types.VARCHAR },
  			{ "currency_usd", Types.DOUBLE },
  			{ "date_", Types.TIMESTAMP }
  		};
  	public static final String TABLE_SQL_CREATE = "create table whp_whp_sites_budget (whp_sites_budget_id LONG not null primary key,site_id LONG,currency_local DOUBLE,currency_ VARCHAR(50) null,currency_usd DOUBLE,date_ DATE null)";
  	public static final String TABLE_SQL_DROP = "drop table whp_whp_sites_budget";
  	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_budget"),
  			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_budget"),
  			true);
  	public static final boolean COLUMN_BITMASK_ENABLED = false;
  	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_budget"));
  
  	public whp_sites_budgetModelImpl() {
  	}
  
  	public long getPrimaryKey() {
  		return _whp_sites_budget_id;
  	}
  
  	public void setPrimaryKey(long primaryKey) {
  		setWhp_sites_budget_id(primaryKey);
  	}
  
  	public Serializable getPrimaryKeyObj() {
  		return new Long(_whp_sites_budget_id);
  	}
  
  	public void setPrimaryKeyObj(Serializable primaryKeyObj) {
  		setPrimaryKey(((Long)primaryKeyObj).longValue());
  	}
  
  	public Class<?> getModelClass() {
  		return whp_sites_budget.class;
  	}
  
  	public String getModelClassName() {
  		return whp_sites_budget.class.getName();
  	}
  
  	@Override
  	public Map<String, Object> getModelAttributes() {
  		Map<String, Object> attributes = new HashMap<String, Object>();
  
  		attributes.put("whp_sites_budget_id", getWhp_sites_budget_id());
  		attributes.put("site_id", getSite_id());
  		attributes.put("currency_local", getCurrency_local());
  		attributes.put("currency", getCurrency());
  		attributes.put("currency_usd", getCurrency_usd());
  		attributes.put("date", getDate());
  
  		return attributes;
  	}
  
  	@Override
  	public void setModelAttributes(Map<String, Object> attributes) {
  		Long whp_sites_budget_id = (Long)attributes.get("whp_sites_budget_id");
  
  		if (whp_sites_budget_id != null) {
  			setWhp_sites_budget_id(whp_sites_budget_id);
  		}
  
  		Long site_id = (Long)attributes.get("site_id");
  
  		if (site_id != null) {
  			setSite_id(site_id);
  		}
  
  		Double currency_local = (Double)attributes.get("currency_local");
  
  		if (currency_local != null) {
  			setCurrency_local(currency_local);
  		}
  
  		String currency = (String)attributes.get("currency");
  
  		if (currency != null) {
  			setCurrency(currency);
  		}
  
  		Double currency_usd = (Double)attributes.get("currency_usd");
  
  		if (currency_usd != null) {
  			setCurrency_usd(currency_usd);
  		}
  
  		Date date = (Date)attributes.get("date");
  
  		if (date != null) {
  			setDate(date);
  		}
  	}
  
  	public long getWhp_sites_budget_id() {
  		return _whp_sites_budget_id;
  	}
  
  	public void setWhp_sites_budget_id(long whp_sites_budget_id) {
  		_whp_sites_budget_id = whp_sites_budget_id;
  	}
  
  	public long getSite_id() {
  		return _site_id;
  	}
  
  	public void setSite_id(long site_id) {
  		_site_id = site_id;
  	}
  
  	public double getCurrency_local() {
  		return _currency_local;
  	}
  
  	public void setCurrency_local(double currency_local) {
  		_currency_local = currency_local;
  	}
  
  	public String getCurrency() {
  		if (_currency == null) {
  			return StringPool.BLANK;
  		}
  		else {
  			return _currency;
  		}
  	}
  
  	public void setCurrency(String currency) {
  		_currency = currency;
  	}
  
  	public double getCurrency_usd() {
  		return _currency_usd;
  	}
  
  	public void setCurrency_usd(double currency_usd) {
  		_currency_usd = currency_usd;
  	}
  
  	public Date getDate() {
  		return _date;
  	}
  
  	public void setDate(Date date) {
  		_date = date;
  	}
  
  	@Override
  	public ExpandoBridge getExpandoBridge() {
  		return ExpandoBridgeFactoryUtil.getExpandoBridge(0,
  			whp_sites_budget.class.getName(), getPrimaryKey());
  	}
  
  	@Override
  	public void setExpandoBridgeAttributes(ServiceContext serviceContext) {
  		ExpandoBridge expandoBridge = getExpandoBridge();
  
  		expandoBridge.setAttributes(serviceContext);
  	}
  
  	@Override
  	public whp_sites_budget toEscapedModel() {
  		if (_escapedModelProxy == null) {
  			_escapedModelProxy = (whp_sites_budget)ProxyUtil.newProxyInstance(_classLoader,
  					_escapedModelProxyInterfaces,
  					new AutoEscapeBeanHandler(this));
  		}
  
  		return _escapedModelProxy;
  	}
  
  	@Override
  	public Object clone() {
  		whp_sites_budgetImpl whp_sites_budgetImpl = new whp_sites_budgetImpl();
  
  		whp_sites_budgetImpl.setWhp_sites_budget_id(getWhp_sites_budget_id());
  		whp_sites_budgetImpl.setSite_id(getSite_id());
  		whp_sites_budgetImpl.setCurrency_local(getCurrency_local());
  		whp_sites_budgetImpl.setCurrency(getCurrency());
  		whp_sites_budgetImpl.setCurrency_usd(getCurrency_usd());
  		whp_sites_budgetImpl.setDate(getDate());
  
  		whp_sites_budgetImpl.resetOriginalValues();
  
  		return whp_sites_budgetImpl;
  	}
  
  	public int compareTo(whp_sites_budget whp_sites_budget) {
  		long primaryKey = whp_sites_budget.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_budget whp_sites_budget = null;
  
  		try {
  			whp_sites_budget = (whp_sites_budget)obj;
  		}
  		catch (ClassCastException cce) {
  			return false;
  		}
  
  		long primaryKey = whp_sites_budget.getPrimaryKey();
  
  