/*
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * published by the Free Software Foundation; either version 2.1 of
 * the license, or (at your option) any later version.
 *
 * This program 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 General Public License for more details.
 *  
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite
 * 330, Boston, MA  02111-1307, USA.
 * 
 */
package com.k_int.svc.custprops.datamodel;

import javax.persistence.CascadeType;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;

import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;


/**
 * Title:		ReferencePropertyValueHDO
 * @author: 	rob
 * @version:	$Id: v Exp $ 
 * @since			
 * Copyright:	1999-2007 Knowledge Integration Ltd
 * Company:		Knowledge Integration Ltd
 * Description:
 *
 *
 *
 * Created:		29 Dec 2007
 *
 *
 * History:
 *				$Log: v $
 *
 * 
 */
@Entity
@DiscriminatorValue("4")
public class ReferencePropertyValueHDO extends PropertyValueHDO
{
  private ReferenceHDO reference;
 
  
  @ManyToOne( cascade = {CascadeType.PERSIST, CascadeType.MERGE} )
  @JoinColumn(name="REF_ID")   
  public  ReferenceHDO getReference()
  {
    return reference;
  }
  
  public  void setReference(ReferenceHDO reference)
  {
    this.reference=reference;
  }
  
  public PropertyValueHDO clone()
  {
    ReferencePropertyValueHDO ref = new ReferencePropertyValueHDO();
    ref.setReference(reference);  
    return ref;
  }
}
