/*
 * This is autogenerated and should not be modified.
 * Any changes should be made to the super class.
 * Copyright: (c) Reinders Posters
 * Modified:  $Date$
 */

package nl.reinders.bm.generated;

import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.beans.PropertyVetoException;
import java.beans.VetoableChangeListener;
import java.beans.VetoableChangeSupport;

import javax.persistence.EntityManager;
import javax.persistence.MappedSuperclass;
import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.SequenceGenerator;
import javax.persistence.TableGenerator;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Version;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.FetchType;
import javax.persistence.CascadeType;
import javax.persistence.JoinColumn;
import javax.persistence.Query;
import javax.persistence.Transient;

/**
 * A JPA entity class for sellorder.
 * @version    $Revision$
 * @author     $Author$
 */
@MappedSuperclass
abstract public class Sellorder extends nl.reinders.bm.AbstractBean
implements java.io.Serializable
         , java.lang.Cloneable
         , Comparable<nl.reinders.bm.Sellorder>
{
	static final long serialVersionUID = 0;
	static final String SOURCECODE_VERSION = "$Revision$";
	static org.apache.log4j.Logger log4j = org.apache.log4j.Logger.getLogger(Sellorder.class.getName());

	// ===============================================================================================
	// RELATIONS OneToMany

	/** EdifactorderssWhereIAmSellorder*/
	public void addEdifactorderssWhereIAmSellorder(nl.reinders.bm.Edifactorders value)
	{
		if (value != null && !iEdifactorderssWhereIAmSellorder.contains(value))
		{
			iEdifactorderssWhereIAmSellorder.add(value);
			value.setSellorder( (nl.reinders.bm.Sellorder)this);
		}
	}
	public void removeEdifactorderssWhereIAmSellorder(nl.reinders.bm.Edifactorders value)
	{
		if (value != null && iEdifactorderssWhereIAmSellorder.contains(value))
		{
			iEdifactorderssWhereIAmSellorder.remove(value);
			value.setSellorder( (nl.reinders.bm.Sellorder)null );
		}
	}
	public java.util.List<nl.reinders.bm.Edifactorders> getEdifactorderssWhereIAmSellorder() { return iEdifactorderssWhereIAmSellorder; }
	@OneToMany(mappedBy = "iSellorder", fetch = FetchType.LAZY, targetEntity = nl.reinders.bm.Edifactorders.class, cascade = {CascadeType.PERSIST, CascadeType.REFRESH, CascadeType.MERGE} )
	private java.util.List<nl.reinders.bm.Edifactorders> iEdifactorderssWhereIAmSellorder = new java.util.ArrayList<nl.reinders.bm.Edifactorders>();

	/** RelationversionsWhereIAmSellorder*/
	public void addRelationversionsWhereIAmSellorder(nl.reinders.bm.Relationversion value)
	{
		if (value != null && !iRelationversionsWhereIAmSellorder.contains(value))
		{
			iRelationversionsWhereIAmSellorder.add(value);
			value.setSellorder( (nl.reinders.bm.Sellorder)this);
		}
	}
	public void removeRelationversionsWhereIAmSellorder(nl.reinders.bm.Relationversion value)
	{
		if (value != null && iRelationversionsWhereIAmSellorder.contains(value))
		{
			iRelationversionsWhereIAmSellorder.remove(value);
			value.setSellorder( (nl.reinders.bm.Sellorder)null );
		}
	}
	public java.util.List<nl.reinders.bm.Relationversion> getRelationversionsWhereIAmSellorder() { return iRelationversionsWhereIAmSellorder; }
	@OneToMany(mappedBy = "iSellorder", fetch = FetchType.LAZY, targetEntity = nl.reinders.bm.Relationversion.class, cascade = {CascadeType.PERSIST, CascadeType.REFRESH, CascadeType.MERGE} )
	private java.util.List<nl.reinders.bm.Relationversion> iRelationversionsWhereIAmSellorder = new java.util.ArrayList<nl.reinders.bm.Relationversion>();

	/** Sellorder2CatsWhereIAmSellorder*/
	public void addSellorder2CatsWhereIAmSellorder(nl.reinders.bm.Sellorder2Cat value)
	{
		if (value != null && !iSellorder2CatsWhereIAmSellorder.contains(value))
		{
			iSellorder2CatsWhereIAmSellorder.add(value);
			value.setSellorder( (nl.reinders.bm.Sellorder)this);
		}
	}
	public void removeSellorder2CatsWhereIAmSellorder(nl.reinders.bm.Sellorder2Cat value)
	{
		if (value != null && iSellorder2CatsWhereIAmSellorder.contains(value))
		{
			iSellorder2CatsWhereIAmSellorder.remove(value);
			value.setSellorder( (nl.reinders.bm.Sellorder)null );
		}
	}
	public java.util.List<nl.reinders.bm.Sellorder2Cat> getSellorder2CatsWhereIAmSellorder() { return iSellorder2CatsWhereIAmSellorder; }
	@OneToMany(mappedBy = "iSellorder", fetch = FetchType.LAZY, targetEntity = nl.reinders.bm.Sellorder2Cat.class, cascade = {CascadeType.PERSIST, CascadeType.REFRESH, CascadeType.MERGE} )
	private java.util.List<nl.reinders.bm.Sellorder2Cat> iSellorder2CatsWhereIAmSellorder = new java.util.ArrayList<nl.reinders.bm.Sellorder2Cat>();

	/** SellorderlinesWhereIAmSellorder*/
	public void addSellorderlinesWhereIAmSellorder(nl.reinders.bm.Sellorderline value)
	{
		if (value != null && !iSellorderlinesWhereIAmSellorder.contains(value))
		{
			iSellorderlinesWhereIAmSellorder.add(value);
			value.setSellorder( (nl.reinders.bm.Sellorder)this);
		}
	}
	public void removeSellorderlinesWhereIAmSellorder(nl.reinders.bm.Sellorderline value)
	{
		if (value != null && iSellorderlinesWhereIAmSellorder.contains(value))
		{
			iSellorderlinesWhereIAmSellorder.remove(value);
			value.setSellorder( (nl.reinders.bm.Sellorder)null );
		}
	}
	public java.util.List<nl.reinders.bm.Sellorderline> getSellorderlinesWhereIAmSellorder() { return iSellorderlinesWhereIAmSellorder; }
	@OneToMany(mappedBy = "iSellorder", fetch = FetchType.LAZY, targetEntity = nl.reinders.bm.Sellorderline.class, cascade = {CascadeType.PERSIST, CascadeType.REFRESH, CascadeType.MERGE} )
	private java.util.List<nl.reinders.bm.Sellorderline> iSellorderlinesWhereIAmSellorder = new java.util.ArrayList<nl.reinders.bm.Sellorderline>();


	// ===============================================================================================
	// RELATIONS ManyToOne

	/** BillingAddress */
	public nl.reinders.bm.Address getBillingAddress() { return iBillingAddress; }
	public void setBillingAddress(nl.reinders.bm.Address value)
	{
		if (value == iBillingAddress) return; // optimalisation and prevent looping
		try
		{
			nl.reinders.bm.Address lValue = iBillingAddress;
			fireVetoableChange(BILLINGADDRESS_PROPERTY_ID, lValue, value);
			if (lValue != null) lValue.removeSellordersWhereIAmBillingAddress( (nl.reinders.bm.Sellorder)this );
			iBillingAddress = value;
			if (value != null) value.addSellordersWhereIAmBillingAddress( (nl.reinders.bm.Sellorder)this );
			firePropertyChange(BILLINGADDRESS_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@ManyToOne(fetch = FetchType.LAZY, targetEntity = nl.reinders.bm.Address.class, cascade = {CascadeType.PERSIST, CascadeType.REFRESH, CascadeType.MERGE} ) @JoinColumn(name="billing_addressnr") 
	private nl.reinders.bm.Address iBillingAddress;
	final static public String BILLINGADDRESS_PROPERTY_ID = "billingAddress";
	final static public Class BILLINGADDRESS_PROPERTY_CLASS = nl.reinders.bm.Address.class;
	final static public String BILLINGADDRESS_NAME = "BillingAddress"; // with this ID you can access the internationalization
	// to make IN queryies possible
	@Column(name="billing_addressnr", insertable=false, updatable=false)
	private java.math.BigDecimal iBillingAddressnr = null;

	/** SendfromAddress */
	public nl.reinders.bm.Address getSendfromAddress() { return iSendfromAddress; }
	public void setSendfromAddress(nl.reinders.bm.Address value)
	{
		if (value == iSendfromAddress) return; // optimalisation and prevent looping
		try
		{
			nl.reinders.bm.Address lValue = iSendfromAddress;
			fireVetoableChange(SENDFROMADDRESS_PROPERTY_ID, lValue, value);
			if (lValue != null) lValue.removeSellordersWhereIAmSendfromAddress( (nl.reinders.bm.Sellorder)this );
			iSendfromAddress = value;
			if (value != null) value.addSellordersWhereIAmSendfromAddress( (nl.reinders.bm.Sellorder)this );
			firePropertyChange(SENDFROMADDRESS_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@ManyToOne(fetch = FetchType.LAZY, targetEntity = nl.reinders.bm.Address.class, cascade = {CascadeType.PERSIST, CascadeType.REFRESH, CascadeType.MERGE} ) @JoinColumn(name="sendfrom_addressnr") 
	private nl.reinders.bm.Address iSendfromAddress;
	final static public String SENDFROMADDRESS_PROPERTY_ID = "sendfromAddress";
	final static public Class SENDFROMADDRESS_PROPERTY_CLASS = nl.reinders.bm.Address.class;
	final static public String SENDFROMADDRESS_NAME = "SendfromAddress"; // with this ID you can access the internationalization
	// to make IN queryies possible
	@Column(name="sendfrom_addressnr", insertable=false, updatable=false)
	private java.math.BigDecimal iSendfromAddressnr = null;

	/** DeliveryAddress */
	public nl.reinders.bm.Address getDeliveryAddress() { return iDeliveryAddress; }
	public void setDeliveryAddress(nl.reinders.bm.Address value)
	{
		if (value == iDeliveryAddress) return; // optimalisation and prevent looping
		try
		{
			nl.reinders.bm.Address lValue = iDeliveryAddress;
			fireVetoableChange(DELIVERYADDRESS_PROPERTY_ID, lValue, value);
			if (lValue != null) lValue.removeSellordersWhereIAmDeliveryAddress( (nl.reinders.bm.Sellorder)this );
			iDeliveryAddress = value;
			if (value != null) value.addSellordersWhereIAmDeliveryAddress( (nl.reinders.bm.Sellorder)this );
			firePropertyChange(DELIVERYADDRESS_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@ManyToOne(fetch = FetchType.LAZY, targetEntity = nl.reinders.bm.Address.class, cascade = {CascadeType.PERSIST, CascadeType.REFRESH, CascadeType.MERGE} ) @JoinColumn(name="delivery_addressnr") 
	private nl.reinders.bm.Address iDeliveryAddress;
	final static public String DELIVERYADDRESS_PROPERTY_ID = "deliveryAddress";
	final static public Class DELIVERYADDRESS_PROPERTY_CLASS = nl.reinders.bm.Address.class;
	final static public String DELIVERYADDRESS_NAME = "DeliveryAddress"; // with this ID you can access the internationalization
	// to make IN queryies possible
	@Column(name="delivery_addressnr", insertable=false, updatable=false)
	private java.math.BigDecimal iDeliveryAddressnr = null;

	/** Contact */
	public nl.reinders.bm.Contact getContact() { return iContact; }
	public void setContact(nl.reinders.bm.Contact value)
	{
		if (value == iContact) return; // optimalisation and prevent looping
		try
		{
			nl.reinders.bm.Contact lValue = iContact;
			fireVetoableChange(CONTACT_PROPERTY_ID, lValue, value);
			if (lValue != null) lValue.removeSellordersWhereIAmContact( (nl.reinders.bm.Sellorder)this );
			iContact = value;
			if (value != null) value.addSellordersWhereIAmContact( (nl.reinders.bm.Sellorder)this );
			firePropertyChange(CONTACT_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@ManyToOne(fetch = FetchType.LAZY, targetEntity = nl.reinders.bm.Contact.class, cascade = {CascadeType.PERSIST, CascadeType.REFRESH, CascadeType.MERGE} ) @JoinColumn(name="contactnr") 
	private nl.reinders.bm.Contact iContact;
	final static public String CONTACT_PROPERTY_ID = "contact";
	final static public Class CONTACT_PROPERTY_CLASS = nl.reinders.bm.Contact.class;
	final static public String CONTACT_NAME = "Contact"; // with this ID you can access the internationalization
	// to make IN queryies possible
	@Column(name="contactnr", insertable=false, updatable=false)
	private java.math.BigDecimal iContactnr = null;

	/** EnteredbyEmp */
	public nl.reinders.bm.Employee getEnteredbyEmp() { return iEnteredbyEmp; }
	public void setEnteredbyEmp(nl.reinders.bm.Employee value)
	{
		if (value == iEnteredbyEmp) return; // optimalisation and prevent looping
		try
		{
			nl.reinders.bm.Employee lValue = iEnteredbyEmp;
			fireVetoableChange(ENTEREDBYEMP_PROPERTY_ID, lValue, value);
			if (lValue != null) lValue.removeSellordersWhereIAmEnteredbyEmp( (nl.reinders.bm.Sellorder)this );
			iEnteredbyEmp = value;
			if (value != null) value.addSellordersWhereIAmEnteredbyEmp( (nl.reinders.bm.Sellorder)this );
			firePropertyChange(ENTEREDBYEMP_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@ManyToOne(fetch = FetchType.LAZY, targetEntity = nl.reinders.bm.Employee.class, cascade = {CascadeType.PERSIST, CascadeType.REFRESH, CascadeType.MERGE} ) @JoinColumn(name="enteredby_empnr") 
	private nl.reinders.bm.Employee iEnteredbyEmp;
	final static public String ENTEREDBYEMP_PROPERTY_ID = "enteredbyEmp";
	final static public Class ENTEREDBYEMP_PROPERTY_CLASS = nl.reinders.bm.Employee.class;
	final static public String ENTEREDBYEMP_NAME = "EnteredbyEmp"; // with this ID you can access the internationalization
	// to make IN queryies possible
	@Column(name="enteredby_empnr", insertable=false, updatable=false)
	private java.math.BigDecimal iEnteredbyEmpnr = null;

	/** Relation */
	public nl.reinders.bm.Relation getRelation() { return iRelation; }
	public void setRelation(nl.reinders.bm.Relation value)
	{
		if (value == iRelation) return; // optimalisation and prevent looping
		try
		{
			nl.reinders.bm.Relation lValue = iRelation;
			fireVetoableChange(RELATION_PROPERTY_ID, lValue, value);
			if (lValue != null) lValue.removeSellordersWhereIAmRelation( (nl.reinders.bm.Sellorder)this );
			iRelation = value;
			if (value != null) value.addSellordersWhereIAmRelation( (nl.reinders.bm.Sellorder)this );
			firePropertyChange(RELATION_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@ManyToOne(fetch = FetchType.LAZY, targetEntity = nl.reinders.bm.Relation.class, cascade = {CascadeType.PERSIST, CascadeType.REFRESH, CascadeType.MERGE} ) @JoinColumn(name="relationnr") 
	private nl.reinders.bm.Relation iRelation;
	final static public String RELATION_PROPERTY_ID = "relation";
	final static public Class RELATION_PROPERTY_CLASS = nl.reinders.bm.Relation.class;
	final static public String RELATION_NAME = "Relation"; // with this ID you can access the internationalization
	// to make IN queryies possible
	@Column(name="relationnr", insertable=false, updatable=false)
	private java.math.BigDecimal iRelationnr = null;



	// ===============================================================================================
	// PROPERTIES

	/** Sellordernr */
	public Integer getSellordernr() { return iSellordernr; }
	public void setSellordernr(Integer value)
	{
		try
		{
			Integer lValue = iSellordernr;
			if (log4j.isDebugEnabled()) log4j.debug("setSellordernr: " + lValue + " -> " + value);
			fireVetoableChange(SELLORDERNR_PROPERTY_ID, lValue, value);
			iSellordernr = value;
			firePropertyChange(SELLORDERNR_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@Id @GeneratedValue(generator="sellorder.sellordernr", strategy=GenerationType.TABLE) @TableGenerator( name="sellorder.sellordernr", pkColumnValue="sellordernr", table="sequence", pkColumnName="seq_name", valueColumnName="seq_count", initialValue=1, allocationSize=1) @Column(name="sellordernr")
	private Integer iSellordernr = null;
	final static public String SELLORDERNR_PROPERTY_ID = "sellordernr";
	final static public Class SELLORDERNR_PROPERTY_CLASS = Integer.class;
	final static public String SELLORDERNR_NAME = "Sellordernr"; // with this ID you can access the internationalization

	/** Oldsellordernr */
	public String getOldsellordernr() { return iOldsellordernr; }
	public void setOldsellordernr(String value)
	{
		try
		{
			String lValue = iOldsellordernr;
			if (log4j.isDebugEnabled()) log4j.debug("setOldsellordernr: " + lValue + " -> " + value);
			fireVetoableChange(OLDSELLORDERNR_PROPERTY_ID, lValue, value);
			iOldsellordernr = value;
			firePropertyChange(OLDSELLORDERNR_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@Column(name="oldsellordernr")
	private String iOldsellordernr = null;
	final static public String OLDSELLORDERNR_PROPERTY_ID = "oldsellordernr";
	final static public Class OLDSELLORDERNR_PROPERTY_CLASS = String.class;
	final static public String OLDSELLORDERNR_NAME = "Oldsellordernr"; // with this ID you can access the internationalization

	/** DeliveryPrintnote */
	public Integer getDeliveryPrintnote() { return iDeliveryPrintnote; }
	public void setDeliveryPrintnote(Integer value)
	{
		try
		{
			Integer lValue = iDeliveryPrintnote;
			if (log4j.isDebugEnabled()) log4j.debug("setDeliveryPrintnote: " + lValue + " -> " + value);
			fireVetoableChange(DELIVERYPRINTNOTE_PROPERTY_ID, lValue, value);
			iDeliveryPrintnote = value;
			firePropertyChange(DELIVERYPRINTNOTE_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@Column(name="delivery_printnote")
	private Integer iDeliveryPrintnote = null;
	final static public String DELIVERYPRINTNOTE_PROPERTY_ID = "deliveryPrintnote";
	final static public Class DELIVERYPRINTNOTE_PROPERTY_CLASS = Integer.class;
	final static public String DELIVERYPRINTNOTE_NAME = "DeliveryPrintnote"; // with this ID you can access the internationalization

	/** PickupPrintnote */
	public Integer getPickupPrintnote() { return iPickupPrintnote; }
	public void setPickupPrintnote(Integer value)
	{
		try
		{
			Integer lValue = iPickupPrintnote;
			if (log4j.isDebugEnabled()) log4j.debug("setPickupPrintnote: " + lValue + " -> " + value);
			fireVetoableChange(PICKUPPRINTNOTE_PROPERTY_ID, lValue, value);
			iPickupPrintnote = value;
			firePropertyChange(PICKUPPRINTNOTE_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@Column(name="pickup_printnote")
	private Integer iPickupPrintnote = null;
	final static public String PICKUPPRINTNOTE_PROPERTY_ID = "pickupPrintnote";
	final static public Class PICKUPPRINTNOTE_PROPERTY_CLASS = Integer.class;
	final static public String PICKUPPRINTNOTE_NAME = "PickupPrintnote"; // with this ID you can access the internationalization

	/** Reduction */
	public java.math.BigDecimal getReduction() { return iReduction; }
	public void setReduction(java.math.BigDecimal value)
	{
		try
		{
			java.math.BigDecimal lValue = iReduction;
			if (log4j.isDebugEnabled()) log4j.debug("setReduction: " + lValue + " -> " + value);
			fireVetoableChange(REDUCTION_PROPERTY_ID, lValue, value);
			iReduction = value;
			firePropertyChange(REDUCTION_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@Column(name="reduction")
	private java.math.BigDecimal iReduction = null;
	final static public String REDUCTION_PROPERTY_ID = "reduction";
	final static public Class REDUCTION_PROPERTY_CLASS = java.math.BigDecimal.class;
	final static public String REDUCTION_NAME = "Reduction"; // with this ID you can access the internationalization

	/** Selldate */
	public java.util.Calendar getSelldate() { return iSelldate; }
	public void setSelldate(java.util.Calendar value)
	{
		try
		{
			java.util.Calendar lValue = iSelldate;
			if (log4j.isDebugEnabled()) log4j.debug("setSelldate: " + lValue + " -> " + value);
			fireVetoableChange(SELLDATE_PROPERTY_ID, lValue, value);
			iSelldate = value;
			firePropertyChange(SELLDATE_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@Temporal(TemporalType.TIMESTAMP) @Column(name="selldate")
	private java.util.Calendar iSelldate = null;
	final static public String SELLDATE_PROPERTY_ID = "selldate";
	final static public Class SELLDATE_PROPERTY_CLASS = java.util.Calendar.class;
	final static public String SELLDATE_NAME = "Selldate"; // with this ID you can access the internationalization

	/** Kilos */
	public Integer getKilos() { return iKilos; }
	public void setKilos(Integer value)
	{
		try
		{
			Integer lValue = iKilos;
			if (log4j.isDebugEnabled()) log4j.debug("setKilos: " + lValue + " -> " + value);
			fireVetoableChange(KILOS_PROPERTY_ID, lValue, value);
			iKilos = value;
			firePropertyChange(KILOS_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@Column(name="kilos")
	private Integer iKilos = null;
	final static public String KILOS_PROPERTY_ID = "kilos";
	final static public Class KILOS_PROPERTY_CLASS = Integer.class;
	final static public String KILOS_NAME = "Kilos"; // with this ID you can access the internationalization

	/** Description */
	public String getDescription() { return iDescription; }
	public void setDescription(String value)
	{
		try
		{
			String lValue = iDescription;
			if (log4j.isDebugEnabled()) log4j.debug("setDescription: " + lValue + " -> " + value);
			fireVetoableChange(DESCRIPTION_PROPERTY_ID, lValue, value);
			iDescription = value;
			firePropertyChange(DESCRIPTION_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@Column(name="description")
	private String iDescription = null;
	final static public String DESCRIPTION_PROPERTY_ID = "description";
	final static public Class DESCRIPTION_PROPERTY_CLASS = String.class;
	final static public String DESCRIPTION_NAME = "Description"; // with this ID you can access the internationalization

	/** NoDelivery */
	public Integer getNoDelivery() { return iNoDelivery; }
	public void setNoDelivery(Integer value)
	{
		try
		{
			Integer lValue = iNoDelivery;
			if (log4j.isDebugEnabled()) log4j.debug("setNoDelivery: " + lValue + " -> " + value);
			fireVetoableChange(NODELIVERY_PROPERTY_ID, lValue, value);
			iNoDelivery = value;
			firePropertyChange(NODELIVERY_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@Column(name="no_delivery")
	private Integer iNoDelivery = null;
	final static public String NODELIVERY_PROPERTY_ID = "noDelivery";
	final static public Class NODELIVERY_PROPERTY_CLASS = Integer.class;
	final static public String NODELIVERY_NAME = "NoDelivery"; // with this ID you can access the internationalization

	/** Retour */
	public String getRetour() { return iRetour; }
	public void setRetour(String value)
	{
		try
		{
			String lValue = iRetour;
			if (log4j.isDebugEnabled()) log4j.debug("setRetour: " + lValue + " -> " + value);
			fireVetoableChange(RETOUR_PROPERTY_ID, lValue, value);
			iRetour = value;
			firePropertyChange(RETOUR_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@Column(name="retour")
	private String iRetour = null;
	final static public String RETOUR_PROPERTY_ID = "retour";
	final static public Class RETOUR_PROPERTY_CLASS = String.class;
	final static public String RETOUR_NAME = "Retour"; // with this ID you can access the internationalization

	/** Diskonto */
	public java.math.BigDecimal getDiskonto() { return iDiskonto; }
	public void setDiskonto(java.math.BigDecimal value)
	{
		try
		{
			java.math.BigDecimal lValue = iDiskonto;
			if (log4j.isDebugEnabled()) log4j.debug("setDiskonto: " + lValue + " -> " + value);
			fireVetoableChange(DISKONTO_PROPERTY_ID, lValue, value);
			iDiskonto = value;
			firePropertyChange(DISKONTO_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@Column(name="diskonto")
	private java.math.BigDecimal iDiskonto = null;
	final static public String DISKONTO_PROPERTY_ID = "diskonto";
	final static public Class DISKONTO_PROPERTY_CLASS = java.math.BigDecimal.class;
	final static public String DISKONTO_NAME = "Diskonto"; // with this ID you can access the internationalization

	/** ExternalSellorder */
	public String getExternalSellorder() { return iExternalSellorder; }
	public void setExternalSellorder(String value)
	{
		try
		{
			String lValue = iExternalSellorder;
			if (log4j.isDebugEnabled()) log4j.debug("setExternalSellorder: " + lValue + " -> " + value);
			fireVetoableChange(EXTERNALSELLORDER_PROPERTY_ID, lValue, value);
			iExternalSellorder = value;
			firePropertyChange(EXTERNALSELLORDER_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@Column(name="external_sellorder")
	private String iExternalSellorder = null;
	final static public String EXTERNALSELLORDER_PROPERTY_ID = "externalSellorder";
	final static public Class EXTERNALSELLORDER_PROPERTY_CLASS = String.class;
	final static public String EXTERNALSELLORDER_NAME = "ExternalSellorder"; // with this ID you can access the internationalization

	/** FactureDate */
	public java.util.Calendar getFactureDate() { return iFactureDate; }
	public void setFactureDate(java.util.Calendar value)
	{
		try
		{
			java.util.Calendar lValue = iFactureDate;
			if (log4j.isDebugEnabled()) log4j.debug("setFactureDate: " + lValue + " -> " + value);
			fireVetoableChange(FACTUREDATE_PROPERTY_ID, lValue, value);
			iFactureDate = value;
			firePropertyChange(FACTUREDATE_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@Temporal(TemporalType.TIMESTAMP) @Column(name="facture_date")
	private java.util.Calendar iFactureDate = null;
	final static public String FACTUREDATE_PROPERTY_ID = "factureDate";
	final static public Class FACTUREDATE_PROPERTY_CLASS = java.util.Calendar.class;
	final static public String FACTUREDATE_NAME = "FactureDate"; // with this ID you can access the internationalization

	/** Tax */
	public java.math.BigDecimal getTax() { return iTax; }
	public void setTax(java.math.BigDecimal value)
	{
		try
		{
			java.math.BigDecimal lValue = iTax;
			if (log4j.isDebugEnabled()) log4j.debug("setTax: " + lValue + " -> " + value);
			fireVetoableChange(TAX_PROPERTY_ID, lValue, value);
			iTax = value;
			firePropertyChange(TAX_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@Column(name="tax")
	private java.math.BigDecimal iTax = null;
	final static public String TAX_PROPERTY_ID = "tax";
	final static public Class TAX_PROPERTY_CLASS = java.math.BigDecimal.class;
	final static public String TAX_NAME = "Tax"; // with this ID you can access the internationalization

	/** Bez */
	public java.math.BigDecimal getBez() { return iBez; }
	public void setBez(java.math.BigDecimal value)
	{
		try
		{
			java.math.BigDecimal lValue = iBez;
			if (log4j.isDebugEnabled()) log4j.debug("setBez: " + lValue + " -> " + value);
			fireVetoableChange(BEZ_PROPERTY_ID, lValue, value);
			iBez = value;
			firePropertyChange(BEZ_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@Column(name="bez")
	private java.math.BigDecimal iBez = null;
	final static public String BEZ_PROPERTY_ID = "bez";
	final static public Class BEZ_PROPERTY_CLASS = java.math.BigDecimal.class;
	final static public String BEZ_NAME = "Bez"; // with this ID you can access the internationalization

	/** Lazylock */
	public Integer getLazylock() { return iLazylock; }
	public void setLazylock(Integer value)
	{
		try
		{
			Integer lValue = iLazylock;
			if (log4j.isDebugEnabled()) log4j.debug("setLazylock: " + lValue + " -> " + value);
			fireVetoableChange(LAZYLOCK_PROPERTY_ID, lValue, value);
			iLazylock = value;
			firePropertyChange(LAZYLOCK_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@Version @Column(name="lazylock")
	private Integer iLazylock = 0;
	final static public String LAZYLOCK_PROPERTY_ID = "lazylock";
	final static public Class LAZYLOCK_PROPERTY_CLASS = Integer.class;
	final static public String LAZYLOCK_NAME = "Lazylock"; // with this ID you can access the internationalization

	/** PaymentAgreement */
	public String getPaymentAgreement() { return iPaymentAgreement; }
	public void setPaymentAgreement(String value)
	{
		try
		{
			String lValue = iPaymentAgreement;
			if (log4j.isDebugEnabled()) log4j.debug("setPaymentAgreement: " + lValue + " -> " + value);
			fireVetoableChange(PAYMENTAGREEMENT_PROPERTY_ID, lValue, value);
			iPaymentAgreement = value;
			firePropertyChange(PAYMENTAGREEMENT_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@Column(name="payment_agreement")
	private String iPaymentAgreement = null;
	final static public String PAYMENTAGREEMENT_PROPERTY_ID = "paymentAgreement";
	final static public Class PAYMENTAGREEMENT_PROPERTY_CLASS = String.class;
	final static public String PAYMENTAGREEMENT_NAME = "PaymentAgreement"; // with this ID you can access the internationalization

	/** State */
	public Integer getState() { return iState; }
	public void setState(Integer value)
	{
		try
		{
			Integer lValue = iState;
			if (log4j.isDebugEnabled()) log4j.debug("setState: " + lValue + " -> " + value);
			fireVetoableChange(STATE_PROPERTY_ID, lValue, value);
			iState = value;
			firePropertyChange(STATE_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@Column(name="state")
	private Integer iState = 0;
	final static public String STATE_PROPERTY_ID = "state";
	final static public Class STATE_PROPERTY_CLASS = Integer.class;
	final static public String STATE_NAME = "State"; // with this ID you can access the internationalization

	/** Deliveryinfo */
	public String getDeliveryinfo() { return iDeliveryinfo; }
	public void setDeliveryinfo(String value)
	{
		try
		{
			String lValue = iDeliveryinfo;
			if (log4j.isDebugEnabled()) log4j.debug("setDeliveryinfo: " + lValue + " -> " + value);
			fireVetoableChange(DELIVERYINFO_PROPERTY_ID, lValue, value);
			iDeliveryinfo = value;
			firePropertyChange(DELIVERYINFO_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@Column(name="deliveryinfo")
	private String iDeliveryinfo = null;
	final static public String DELIVERYINFO_PROPERTY_ID = "deliveryinfo";
	final static public Class DELIVERYINFO_PROPERTY_CLASS = String.class;
	final static public String DELIVERYINFO_NAME = "Deliveryinfo"; // with this ID you can access the internationalization

	/** Picklistprinted */
	public Integer getPicklistprinted() { return iPicklistprinted; }
	public void setPicklistprinted(Integer value)
	{
		try
		{
			Integer lValue = iPicklistprinted;
			if (log4j.isDebugEnabled()) log4j.debug("setPicklistprinted: " + lValue + " -> " + value);
			fireVetoableChange(PICKLISTPRINTED_PROPERTY_ID, lValue, value);
			iPicklistprinted = value;
			firePropertyChange(PICKLISTPRINTED_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@Column(name="picklistprinted")
	private Integer iPicklistprinted = null;
	final static public String PICKLISTPRINTED_PROPERTY_ID = "picklistprinted";
	final static public Class PICKLISTPRINTED_PROPERTY_CLASS = Integer.class;
	final static public String PICKLISTPRINTED_NAME = "Picklistprinted"; // with this ID you can access the internationalization

	/** Skontodagen */
	public Integer getSkontodagen() { return iSkontodagen; }
	public void setSkontodagen(Integer value)
	{
		try
		{
			Integer lValue = iSkontodagen;
			if (log4j.isDebugEnabled()) log4j.debug("setSkontodagen: " + lValue + " -> " + value);
			fireVetoableChange(SKONTODAGEN_PROPERTY_ID, lValue, value);
			iSkontodagen = value;
			firePropertyChange(SKONTODAGEN_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@Column(name="skontodagen")
	private Integer iSkontodagen = null;
	final static public String SKONTODAGEN_PROPERTY_ID = "skontodagen";
	final static public Class SKONTODAGEN_PROPERTY_CLASS = Integer.class;
	final static public String SKONTODAGEN_NAME = "Skontodagen"; // with this ID you can access the internationalization

	/** Tobepaidwithin */
	public Integer getTobepaidwithin() { return iTobepaidwithin; }
	public void setTobepaidwithin(Integer value)
	{
		try
		{
			Integer lValue = iTobepaidwithin;
			if (log4j.isDebugEnabled()) log4j.debug("setTobepaidwithin: " + lValue + " -> " + value);
			fireVetoableChange(TOBEPAIDWITHIN_PROPERTY_ID, lValue, value);
			iTobepaidwithin = value;
			firePropertyChange(TOBEPAIDWITHIN_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@Column(name="tobepaidwithin")
	private Integer iTobepaidwithin = null;
	final static public String TOBEPAIDWITHIN_PROPERTY_ID = "tobepaidwithin";
	final static public Class TOBEPAIDWITHIN_PROPERTY_CLASS = Integer.class;
	final static public String TOBEPAIDWITHIN_NAME = "Tobepaidwithin"; // with this ID you can access the internationalization

	/** Edifact */
	public java.util.Calendar getEdifact() { return iEdifact; }
	public void setEdifact(java.util.Calendar value)
	{
		try
		{
			java.util.Calendar lValue = iEdifact;
			if (log4j.isDebugEnabled()) log4j.debug("setEdifact: " + lValue + " -> " + value);
			fireVetoableChange(EDIFACT_PROPERTY_ID, lValue, value);
			iEdifact = value;
			firePropertyChange(EDIFACT_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@Temporal(TemporalType.TIMESTAMP) @Column(name="edifact")
	private java.util.Calendar iEdifact = null;
	final static public String EDIFACT_PROPERTY_ID = "edifact";
	final static public Class EDIFACT_PROPERTY_CLASS = java.util.Calendar.class;
	final static public String EDIFACT_NAME = "Edifact"; // with this ID you can access the internationalization

	/** Dwhmodified */
	public java.util.Calendar getDwhmodified() { return iDwhmodified; }
	public void setDwhmodified(java.util.Calendar value)
	{
		try
		{
			java.util.Calendar lValue = iDwhmodified;
			if (log4j.isDebugEnabled()) log4j.debug("setDwhmodified: " + lValue + " -> " + value);
			fireVetoableChange(DWHMODIFIED_PROPERTY_ID, lValue, value);
			iDwhmodified = value;
			firePropertyChange(DWHMODIFIED_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@Temporal(TemporalType.TIMESTAMP) @Column(name="dwhmodified")
	private java.util.Calendar iDwhmodified = new java.util.GregorianCalendar();
	final static public String DWHMODIFIED_PROPERTY_ID = "dwhmodified";
	final static public Class DWHMODIFIED_PROPERTY_CLASS = java.util.Calendar.class;
	final static public String DWHMODIFIED_NAME = "Dwhmodified"; // with this ID you can access the internationalization

	/** Dwhby */
	public Integer getDwhby() { return iDwhby; }
	public void setDwhby(Integer value)
	{
		try
		{
			Integer lValue = iDwhby;
			if (log4j.isDebugEnabled()) log4j.debug("setDwhby: " + lValue + " -> " + value);
			fireVetoableChange(DWHBY_PROPERTY_ID, lValue, value);
			iDwhby = value;
			firePropertyChange(DWHBY_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@Column(name="dwhby")
	private Integer iDwhby = null;
	final static public String DWHBY_PROPERTY_ID = "dwhby";
	final static public Class DWHBY_PROPERTY_CLASS = Integer.class;
	final static public String DWHBY_NAME = "Dwhby"; // with this ID you can access the internationalization

	/** ToEuro */
	public java.math.BigDecimal getToEuro() { return iToEuro; }
	public void setToEuro(java.math.BigDecimal value)
	{
		try
		{
			java.math.BigDecimal lValue = iToEuro;
			if (log4j.isDebugEnabled()) log4j.debug("setToEuro: " + lValue + " -> " + value);
			fireVetoableChange(TOEURO_PROPERTY_ID, lValue, value);
			iToEuro = value;
			firePropertyChange(TOEURO_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@Column(name="to_euro")
	private java.math.BigDecimal iToEuro = new java.math.BigDecimal("1.0000000000000000");
	final static public String TOEURO_PROPERTY_ID = "toEuro";
	final static public Class TOEURO_PROPERTY_CLASS = java.math.BigDecimal.class;
	final static public String TOEURO_NAME = "ToEuro"; // with this ID you can access the internationalization

	/** Currencynr */
	public Integer getCurrencynr() { return iCurrencynr; }
	public void setCurrencynr(Integer value)
	{
		try
		{
			Integer lValue = iCurrencynr;
			if (log4j.isDebugEnabled()) log4j.debug("setCurrencynr: " + lValue + " -> " + value);
			fireVetoableChange(CURRENCYNR_PROPERTY_ID, lValue, value);
			iCurrencynr = value;
			firePropertyChange(CURRENCYNR_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@Column(name="currencynr")
	private Integer iCurrencynr = null;
	final static public String CURRENCYNR_PROPERTY_ID = "currencynr";
	final static public Class CURRENCYNR_PROPERTY_CLASS = Integer.class;
	final static public String CURRENCYNR_NAME = "Currencynr"; // with this ID you can access the internationalization

	/** Checked */
	public Integer getChecked() { return iChecked; }
	public void setChecked(Integer value)
	{
		try
		{
			Integer lValue = iChecked;
			if (log4j.isDebugEnabled()) log4j.debug("setChecked: " + lValue + " -> " + value);
			fireVetoableChange(CHECKED_PROPERTY_ID, lValue, value);
			iChecked = value;
			firePropertyChange(CHECKED_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@Column(name="checked")
	private Integer iChecked = 0;
	final static public String CHECKED_PROPERTY_ID = "checked";
	final static public Class CHECKED_PROPERTY_CLASS = Integer.class;
	final static public String CHECKED_NAME = "Checked"; // with this ID you can access the internationalization

	/** TransportRelationnr */
	public Integer getTransportRelationnr() { return iTransportRelationnr; }
	public void setTransportRelationnr(Integer value)
	{
		try
		{
			Integer lValue = iTransportRelationnr;
			if (log4j.isDebugEnabled()) log4j.debug("setTransportRelationnr: " + lValue + " -> " + value);
			fireVetoableChange(TRANSPORTRELATIONNR_PROPERTY_ID, lValue, value);
			iTransportRelationnr = value;
			firePropertyChange(TRANSPORTRELATIONNR_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@Column(name="transport_relationnr")
	private Integer iTransportRelationnr = null;
	final static public String TRANSPORTRELATIONNR_PROPERTY_ID = "transportRelationnr";
	final static public Class TRANSPORTRELATIONNR_PROPERTY_CLASS = Integer.class;
	final static public String TRANSPORTRELATIONNR_NAME = "TransportRelationnr"; // with this ID you can access the internationalization

	/** Packaging */
	public String getPackaging() { return iPackaging; }
	public void setPackaging(String value)
	{
		try
		{
			String lValue = iPackaging;
			if (log4j.isDebugEnabled()) log4j.debug("setPackaging: " + lValue + " -> " + value);
			fireVetoableChange(PACKAGING_PROPERTY_ID, lValue, value);
			iPackaging = value;
			firePropertyChange(PACKAGING_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@Column(name="packaging")
	private String iPackaging = null;
	final static public String PACKAGING_PROPERTY_ID = "packaging";
	final static public Class PACKAGING_PROPERTY_CLASS = String.class;
	final static public String PACKAGING_NAME = "Packaging"; // with this ID you can access the internationalization

	/** Packagevalue */
	public Integer getPackagevalue() { return iPackagevalue; }
	public void setPackagevalue(Integer value)
	{
		try
		{
			Integer lValue = iPackagevalue;
			if (log4j.isDebugEnabled()) log4j.debug("setPackagevalue: " + lValue + " -> " + value);
			fireVetoableChange(PACKAGEVALUE_PROPERTY_ID, lValue, value);
			iPackagevalue = value;
			firePropertyChange(PACKAGEVALUE_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@Column(name="packagevalue")
	private Integer iPackagevalue = null;
	final static public String PACKAGEVALUE_PROPERTY_ID = "packagevalue";
	final static public Class PACKAGEVALUE_PROPERTY_CLASS = Integer.class;
	final static public String PACKAGEVALUE_NAME = "Packagevalue"; // with this ID you can access the internationalization

	/** Franco */
	public Integer getFranco() { return iFranco; }
	public void setFranco(Integer value)
	{
		try
		{
			Integer lValue = iFranco;
			if (log4j.isDebugEnabled()) log4j.debug("setFranco: " + lValue + " -> " + value);
			fireVetoableChange(FRANCO_PROPERTY_ID, lValue, value);
			iFranco = value;
			firePropertyChange(FRANCO_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@Column(name="franco")
	private Integer iFranco = null;
	final static public String FRANCO_PROPERTY_ID = "franco";
	final static public Class FRANCO_PROPERTY_CLASS = Integer.class;
	final static public String FRANCO_NAME = "Franco"; // with this ID you can access the internationalization

	/** Inserted */
	public java.util.Calendar getInserted() { return iInserted; }
	public void setInserted(java.util.Calendar value)
	{
		try
		{
			java.util.Calendar lValue = iInserted;
			if (log4j.isDebugEnabled()) log4j.debug("setInserted: " + lValue + " -> " + value);
			fireVetoableChange(INSERTED_PROPERTY_ID, lValue, value);
			iInserted = value;
			firePropertyChange(INSERTED_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@Temporal(TemporalType.TIMESTAMP) @Column(name="inserted")
	private java.util.Calendar iInserted = new java.util.GregorianCalendar();
	final static public String INSERTED_PROPERTY_ID = "inserted";
	final static public Class INSERTED_PROPERTY_CLASS = java.util.Calendar.class;
	final static public String INSERTED_NAME = "Inserted"; // with this ID you can access the internationalization


	// ===============================================================================================
	// Clone

	/** clone */
	public Object clone()
	{ 
		nl.reinders.bm.Sellorder lNew = new nl.reinders.bm.Sellorder();
		lNew.setBillingAddress( getBillingAddress() ); 
		lNew.setSendfromAddress( getSendfromAddress() ); 
		lNew.setDeliveryAddress( getDeliveryAddress() ); 
		lNew.setContact( getContact() ); 
		lNew.setEnteredbyEmp( getEnteredbyEmp() ); 
		lNew.setRelation( getRelation() ); 
		lNew.setOldsellordernr( getOldsellordernr() ); 
		lNew.setDeliveryPrintnote( getDeliveryPrintnote() ); 
		lNew.setPickupPrintnote( getPickupPrintnote() ); 
		lNew.setReduction( getReduction() ); 
		lNew.setSelldate( getSelldate() ); 
		lNew.setKilos( getKilos() ); 
		lNew.setDescription( getDescription() ); 
		lNew.setNoDelivery( getNoDelivery() ); 
		lNew.setRetour( getRetour() ); 
		lNew.setDiskonto( getDiskonto() ); 
		lNew.setExternalSellorder( getExternalSellorder() ); 
		lNew.setFactureDate( getFactureDate() ); 
		lNew.setTax( getTax() ); 
		lNew.setBez( getBez() ); 
		lNew.setPaymentAgreement( getPaymentAgreement() ); 
		lNew.setState( getState() ); 
		lNew.setDeliveryinfo( getDeliveryinfo() ); 
		lNew.setPicklistprinted( getPicklistprinted() ); 
		lNew.setSkontodagen( getSkontodagen() ); 
		lNew.setTobepaidwithin( getTobepaidwithin() ); 
		lNew.setEdifact( getEdifact() ); 
		// not cloning this column: lNew.setDwhmodified( getDwhmodified() ); 
		// not cloning this column: lNew.setDwhby( getDwhby() ); 
		lNew.setToEuro( getToEuro() ); 
		lNew.setCurrencynr( getCurrencynr() ); 
		lNew.setChecked( getChecked() ); 
		lNew.setTransportRelationnr( getTransportRelationnr() ); 
		lNew.setPackaging( getPackaging() ); 
		lNew.setPackagevalue( getPackagevalue() ); 
		lNew.setFranco( getFranco() ); 
		lNew.setInserted( getInserted() ); 
		return lNew;
	}
	public nl.reinders.bm.Sellorder cloneShallow() { return (nl.reinders.bm.Sellorder)clone();}


	// =========================================================================================
	// Comparable

	/**
	 * default compare on primary key
	 */
	public int compareTo(nl.reinders.bm.Sellorder o)
	{
		if (this.getSellordernr() == null) return -1;
		if (o == null) return 1;
		return this.getSellordernr().compareTo( o.getSellordernr() );
	}


	// =========================================================================================
	// DAO

	/**
	 * @param sellordernr
	 */
	static public nl.reinders.bm.Sellorder findByPK(Integer sellordernr)
	{
		EntityManager lEntityManager = org.tbee.util.jpa.EntityManagerFinder.findEntityManager();
		if (log4j.isDebugEnabled()) log4j.debug("Using EM #" + Integer.toHexString( lEntityManager.hashCode() ) );
		Query lQuery = lEntityManager.createQuery("select t from Sellorder t where t.iSellordernr=:sellordernr");
		lQuery.setParameter("sellordernr", sellordernr);
		java.util.List<nl.reinders.bm.Sellorder> lList = lQuery.getResultList();
	    if (lList.size() == 0) return null;
	    return lList.get(0);
	}

	/**
	 * find all entities
	 */
	static public java.util.List<nl.reinders.bm.Sellorder> findAll()
	{
		return findAllOrderedBy(null);
	}

	/**
	 * find all entities ordered by
	 */
	static public java.util.List<nl.reinders.bm.Sellorder> findAllOrderedBy(String orderedBy)
	{
		EntityManager lEntityManager = org.tbee.util.jpa.EntityManagerFinder.findEntityManager();
		if (log4j.isDebugEnabled()) log4j.debug("Using EM #" + Integer.toHexString( lEntityManager.hashCode() ) );
		Query lQuery = lEntityManager.createQuery("select t from Sellorder t" + (orderedBy == null ? "" : " order by t." + orderedBy) + "");
		java.util.List<nl.reinders.bm.Sellorder> lList = lQuery.getResultList();
	    return lList;
	}


	// =========================================================================================
	// EQUALS

	/**
	 *
	 */
	public boolean equals(Object o)
	{
		if (o == null) return false;
		if (!(o instanceof nl.reinders.bm.Sellorder)) return false;
		nl.reinders.bm.Sellorder lOther = (nl.reinders.bm.Sellorder)o;
		if (
			this.getSellordernr() != null && lOther.getSellordernr() != null
		)
		{
			return
				   this.getSellordernr().equals( lOther.getSellordernr() )
			;
		}
		else
			return super.equals(o);
	}



	// =========================================================================================
	// CONVIENIENCE

	/**
	 *
	 */
	public String toString()
	{
		StringBuffer lStringBuffer = new StringBuffer();
		lStringBuffer.append(super.toString());
		lStringBuffer.append(", Sellordernr="); lStringBuffer.append(getSellordernr());
		return lStringBuffer.toString();
	}


	/**
	 * Using the Internationalization class
	 */
	static public String translate(String id)
	{
		return org.tbee.util.Internationalization.getInternationalization().translate(nl.reinders.bm.Sellorder.class, id);
	}
}
