package com.avaje.tests.singleTableInheritance.model;

import javax.persistence.Column;
import javax.persistence.DiscriminatorColumn;
import javax.persistence.DiscriminatorType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

@Entity
@Inheritance(strategy= InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(name="type", discriminatorType= DiscriminatorType.STRING)
public class PalletLocation
{
	@Id
	@Column(name="id")
	private Integer id;

	@ManyToOne(fetch= FetchType.LAZY, optional=false)
    @JoinColumn(name="ZONE_SID")
    private Zone zone;

	public Integer getId()
	{
		return id;
	}

	public void setId(Integer id)
	{
		this.id = id;
	}

	public Zone getZone()
	{
		return zone;
	}

	public void setZone(Zone zone)
	{
		this.zone = zone;
	}
}
