/*
 * 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 article.
 * @version    $Revision$
 * @author     $Author$
 */
@MappedSuperclass
abstract public class Article extends nl.reinders.bm.AbstractBean
implements java.io.Serializable
         , java.lang.Cloneable
         , Comparable<nl.reinders.bm.Article>
{
	static final long serialVersionUID = 0;
	static final String SOURCECODE_VERSION = "$Revision$";
	static org.apache.log4j.Logger log4j = org.apache.log4j.Logger.getLogger(Article.class.getName());

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

	/** Article2ArticlecatsWhereIAmArticle*/
	public void addArticle2ArticlecatsWhereIAmArticle(nl.reinders.bm.Article2Articlecat value)
	{
		if (value != null && !iArticle2ArticlecatsWhereIAmArticle.contains(value))
		{
			iArticle2ArticlecatsWhereIAmArticle.add(value);
			value.setArticle( (nl.reinders.bm.Article)this);
		}
	}
	public void removeArticle2ArticlecatsWhereIAmArticle(nl.reinders.bm.Article2Articlecat value)
	{
		if (value != null && iArticle2ArticlecatsWhereIAmArticle.contains(value))
		{
			iArticle2ArticlecatsWhereIAmArticle.remove(value);
			value.setArticle( (nl.reinders.bm.Article)null );
		}
	}
	public java.util.List<nl.reinders.bm.Article2Articlecat> getArticle2ArticlecatsWhereIAmArticle() { return iArticle2ArticlecatsWhereIAmArticle; }
	@OneToMany(mappedBy = "iArticle", fetch = FetchType.LAZY, targetEntity = nl.reinders.bm.Article2Articlecat.class, cascade = {CascadeType.PERSIST, CascadeType.REFRESH, CascadeType.MERGE} )
	private java.util.List<nl.reinders.bm.Article2Articlecat> iArticle2ArticlecatsWhereIAmArticle = new java.util.ArrayList<nl.reinders.bm.Article2Articlecat>();

	/** Article2StoragesWhereIAmArticle*/
	public void addArticle2StoragesWhereIAmArticle(nl.reinders.bm.Article2Storage value)
	{
		if (value != null && !iArticle2StoragesWhereIAmArticle.contains(value))
		{
			iArticle2StoragesWhereIAmArticle.add(value);
			value.setArticle( (nl.reinders.bm.Article)this);
		}
	}
	public void removeArticle2StoragesWhereIAmArticle(nl.reinders.bm.Article2Storage value)
	{
		if (value != null && iArticle2StoragesWhereIAmArticle.contains(value))
		{
			iArticle2StoragesWhereIAmArticle.remove(value);
			value.setArticle( (nl.reinders.bm.Article)null );
		}
	}
	public java.util.List<nl.reinders.bm.Article2Storage> getArticle2StoragesWhereIAmArticle() { return iArticle2StoragesWhereIAmArticle; }
	@OneToMany(mappedBy = "iArticle", fetch = FetchType.LAZY, targetEntity = nl.reinders.bm.Article2Storage.class, cascade = {CascadeType.PERSIST, CascadeType.REFRESH, CascadeType.MERGE} )
	private java.util.List<nl.reinders.bm.Article2Storage> iArticle2StoragesWhereIAmArticle = new java.util.ArrayList<nl.reinders.bm.Article2Storage>();

	/** ArticlealiassWhereIAmArticle*/
	public void addArticlealiassWhereIAmArticle(nl.reinders.bm.Articlealias value)
	{
		if (value != null && !iArticlealiassWhereIAmArticle.contains(value))
		{
			iArticlealiassWhereIAmArticle.add(value);
			value.setArticle( (nl.reinders.bm.Article)this);
		}
	}
	public void removeArticlealiassWhereIAmArticle(nl.reinders.bm.Articlealias value)
	{
		if (value != null && iArticlealiassWhereIAmArticle.contains(value))
		{
			iArticlealiassWhereIAmArticle.remove(value);
			value.setArticle( (nl.reinders.bm.Article)null );
		}
	}
	public java.util.List<nl.reinders.bm.Articlealias> getArticlealiassWhereIAmArticle() { return iArticlealiassWhereIAmArticle; }
	@OneToMany(mappedBy = "iArticle", fetch = FetchType.LAZY, targetEntity = nl.reinders.bm.Articlealias.class, cascade = {CascadeType.PERSIST, CascadeType.REFRESH, CascadeType.MERGE} )
	private java.util.List<nl.reinders.bm.Articlealias> iArticlealiassWhereIAmArticle = new java.util.ArrayList<nl.reinders.bm.Articlealias>();

	/** BatchsWhereIAmArticle*/
	public void addBatchsWhereIAmArticle(nl.reinders.bm.Batch value)
	{
		if (value != null && !iBatchsWhereIAmArticle.contains(value))
		{
			iBatchsWhereIAmArticle.add(value);
			value.setArticle( (nl.reinders.bm.Article)this);
		}
	}
	public void removeBatchsWhereIAmArticle(nl.reinders.bm.Batch value)
	{
		if (value != null && iBatchsWhereIAmArticle.contains(value))
		{
			iBatchsWhereIAmArticle.remove(value);
			value.setArticle( (nl.reinders.bm.Article)null );
		}
	}
	public java.util.List<nl.reinders.bm.Batch> getBatchsWhereIAmArticle() { return iBatchsWhereIAmArticle; }
	@OneToMany(mappedBy = "iArticle", fetch = FetchType.LAZY, targetEntity = nl.reinders.bm.Batch.class, cascade = {CascadeType.PERSIST, CascadeType.REFRESH, CascadeType.MERGE} )
	private java.util.List<nl.reinders.bm.Batch> iBatchsWhereIAmArticle = new java.util.ArrayList<nl.reinders.bm.Batch>();

	/** BuyorderlinesWhereIAmArticle*/
	public void addBuyorderlinesWhereIAmArticle(nl.reinders.bm.Buyorderline value)
	{
		if (value != null && !iBuyorderlinesWhereIAmArticle.contains(value))
		{
			iBuyorderlinesWhereIAmArticle.add(value);
			value.setArticle( (nl.reinders.bm.Article)this);
		}
	}
	public void removeBuyorderlinesWhereIAmArticle(nl.reinders.bm.Buyorderline value)
	{
		if (value != null && iBuyorderlinesWhereIAmArticle.contains(value))
		{
			iBuyorderlinesWhereIAmArticle.remove(value);
			value.setArticle( (nl.reinders.bm.Article)null );
		}
	}
	public java.util.List<nl.reinders.bm.Buyorderline> getBuyorderlinesWhereIAmArticle() { return iBuyorderlinesWhereIAmArticle; }
	@OneToMany(mappedBy = "iArticle", fetch = FetchType.LAZY, targetEntity = nl.reinders.bm.Buyorderline.class, cascade = {CascadeType.PERSIST, CascadeType.REFRESH, CascadeType.MERGE} )
	private java.util.List<nl.reinders.bm.Buyorderline> iBuyorderlinesWhereIAmArticle = new java.util.ArrayList<nl.reinders.bm.Buyorderline>();

	/** CatalogentrysWhereIAmArticle*/
	public void addCatalogentrysWhereIAmArticle(nl.reinders.bm.Catalogentry value)
	{
		if (value != null && !iCatalogentrysWhereIAmArticle.contains(value))
		{
			iCatalogentrysWhereIAmArticle.add(value);
			value.setArticle( (nl.reinders.bm.Article)this);
		}
	}
	public void removeCatalogentrysWhereIAmArticle(nl.reinders.bm.Catalogentry value)
	{
		if (value != null && iCatalogentrysWhereIAmArticle.contains(value))
		{
			iCatalogentrysWhereIAmArticle.remove(value);
			value.setArticle( (nl.reinders.bm.Article)null );
		}
	}
	public java.util.List<nl.reinders.bm.Catalogentry> getCatalogentrysWhereIAmArticle() { return iCatalogentrysWhereIAmArticle; }
	@OneToMany(mappedBy = "iArticle", fetch = FetchType.LAZY, targetEntity = nl.reinders.bm.Catalogentry.class, cascade = {CascadeType.PERSIST, CascadeType.REFRESH, CascadeType.MERGE} )
	private java.util.List<nl.reinders.bm.Catalogentry> iCatalogentrysWhereIAmArticle = new java.util.ArrayList<nl.reinders.bm.Catalogentry>();

	/** LicenseArticlesWhereIAmArticle*/
	public void addLicenseArticlesWhereIAmArticle(nl.reinders.bm.LicenseArticle value)
	{
		if (value != null && !iLicenseArticlesWhereIAmArticle.contains(value))
		{
			iLicenseArticlesWhereIAmArticle.add(value);
			value.setArticle( (nl.reinders.bm.Article)this);
		}
	}
	public void removeLicenseArticlesWhereIAmArticle(nl.reinders.bm.LicenseArticle value)
	{
		if (value != null && iLicenseArticlesWhereIAmArticle.contains(value))
		{
			iLicenseArticlesWhereIAmArticle.remove(value);
			value.setArticle( (nl.reinders.bm.Article)null );
		}
	}
	public java.util.List<nl.reinders.bm.LicenseArticle> getLicenseArticlesWhereIAmArticle() { return iLicenseArticlesWhereIAmArticle; }
	@OneToMany(mappedBy = "iArticle", fetch = FetchType.LAZY, targetEntity = nl.reinders.bm.LicenseArticle.class, cascade = {CascadeType.PERSIST, CascadeType.REFRESH, CascadeType.MERGE} )
	private java.util.List<nl.reinders.bm.LicenseArticle> iLicenseArticlesWhereIAmArticle = new java.util.ArrayList<nl.reinders.bm.LicenseArticle>();

	/** RollentodolinesWhereIAmArticle*/
	public void addRollentodolinesWhereIAmArticle(nl.reinders.bm.Rollentodoline value)
	{
		if (value != null && !iRollentodolinesWhereIAmArticle.contains(value))
		{
			iRollentodolinesWhereIAmArticle.add(value);
			value.setArticle( (nl.reinders.bm.Article)this);
		}
	}
	public void removeRollentodolinesWhereIAmArticle(nl.reinders.bm.Rollentodoline value)
	{
		if (value != null && iRollentodolinesWhereIAmArticle.contains(value))
		{
			iRollentodolinesWhereIAmArticle.remove(value);
			value.setArticle( (nl.reinders.bm.Article)null );
		}
	}
	public java.util.List<nl.reinders.bm.Rollentodoline> getRollentodolinesWhereIAmArticle() { return iRollentodolinesWhereIAmArticle; }
	@OneToMany(mappedBy = "iArticle", fetch = FetchType.LAZY, targetEntity = nl.reinders.bm.Rollentodoline.class, cascade = {CascadeType.PERSIST, CascadeType.REFRESH, CascadeType.MERGE} )
	private java.util.List<nl.reinders.bm.Rollentodoline> iRollentodolinesWhereIAmArticle = new java.util.ArrayList<nl.reinders.bm.Rollentodoline>();

	/** SellexpectlinesWhereIAmArticle*/
	public void addSellexpectlinesWhereIAmArticle(nl.reinders.bm.Sellexpectline value)
	{
		if (value != null && !iSellexpectlinesWhereIAmArticle.contains(value))
		{
			iSellexpectlinesWhereIAmArticle.add(value);
			value.setArticle( (nl.reinders.bm.Article)this);
		}
	}
	public void removeSellexpectlinesWhereIAmArticle(nl.reinders.bm.Sellexpectline value)
	{
		if (value != null && iSellexpectlinesWhereIAmArticle.contains(value))
		{
			iSellexpectlinesWhereIAmArticle.remove(value);
			value.setArticle( (nl.reinders.bm.Article)null );
		}
	}
	public java.util.List<nl.reinders.bm.Sellexpectline> getSellexpectlinesWhereIAmArticle() { return iSellexpectlinesWhereIAmArticle; }
	@OneToMany(mappedBy = "iArticle", fetch = FetchType.LAZY, targetEntity = nl.reinders.bm.Sellexpectline.class, cascade = {CascadeType.PERSIST, CascadeType.REFRESH, CascadeType.MERGE} )
	private java.util.List<nl.reinders.bm.Sellexpectline> iSellexpectlinesWhereIAmArticle = new java.util.ArrayList<nl.reinders.bm.Sellexpectline>();

	/** SellorderlinesWhereIAmArticle*/
	public void addSellorderlinesWhereIAmArticle(nl.reinders.bm.Sellorderline value)
	{
		if (value != null && !iSellorderlinesWhereIAmArticle.contains(value))
		{
			iSellorderlinesWhereIAmArticle.add(value);
			value.setArticle( (nl.reinders.bm.Article)this);
		}
	}
	public void removeSellorderlinesWhereIAmArticle(nl.reinders.bm.Sellorderline value)
	{
		if (value != null && iSellorderlinesWhereIAmArticle.contains(value))
		{
			iSellorderlinesWhereIAmArticle.remove(value);
			value.setArticle( (nl.reinders.bm.Article)null );
		}
	}
	public java.util.List<nl.reinders.bm.Sellorderline> getSellorderlinesWhereIAmArticle() { return iSellorderlinesWhereIAmArticle; }
	@OneToMany(mappedBy = "iArticle", fetch = FetchType.LAZY, targetEntity = nl.reinders.bm.Sellorderline.class, cascade = {CascadeType.PERSIST, CascadeType.REFRESH, CascadeType.MERGE} )
	private java.util.List<nl.reinders.bm.Sellorderline> iSellorderlinesWhereIAmArticle = new java.util.ArrayList<nl.reinders.bm.Sellorderline>();

	/** StandassignsWhereIAmArticle*/
	public void addStandassignsWhereIAmArticle(nl.reinders.bm.Standassign value)
	{
		if (value != null && !iStandassignsWhereIAmArticle.contains(value))
		{
			iStandassignsWhereIAmArticle.add(value);
			value.setArticle( (nl.reinders.bm.Article)this);
		}
	}
	public void removeStandassignsWhereIAmArticle(nl.reinders.bm.Standassign value)
	{
		if (value != null && iStandassignsWhereIAmArticle.contains(value))
		{
			iStandassignsWhereIAmArticle.remove(value);
			value.setArticle( (nl.reinders.bm.Article)null );
		}
	}
	public java.util.List<nl.reinders.bm.Standassign> getStandassignsWhereIAmArticle() { return iStandassignsWhereIAmArticle; }
	@OneToMany(mappedBy = "iArticle", fetch = FetchType.LAZY, targetEntity = nl.reinders.bm.Standassign.class, cascade = {CascadeType.PERSIST, CascadeType.REFRESH, CascadeType.MERGE} )
	private java.util.List<nl.reinders.bm.Standassign> iStandassignsWhereIAmArticle = new java.util.ArrayList<nl.reinders.bm.Standassign>();

	/** WebimagedownloadsWhereIAmArticle*/
	public void addWebimagedownloadsWhereIAmArticle(nl.reinders.bm.Webimagedownload value)
	{
		if (value != null && !iWebimagedownloadsWhereIAmArticle.contains(value))
		{
			iWebimagedownloadsWhereIAmArticle.add(value);
			value.setArticle( (nl.reinders.bm.Article)this);
		}
	}
	public void removeWebimagedownloadsWhereIAmArticle(nl.reinders.bm.Webimagedownload value)
	{
		if (value != null && iWebimagedownloadsWhereIAmArticle.contains(value))
		{
			iWebimagedownloadsWhereIAmArticle.remove(value);
			value.setArticle( (nl.reinders.bm.Article)null );
		}
	}
	public java.util.List<nl.reinders.bm.Webimagedownload> getWebimagedownloadsWhereIAmArticle() { return iWebimagedownloadsWhereIAmArticle; }
	@OneToMany(mappedBy = "iArticle", fetch = FetchType.LAZY, targetEntity = nl.reinders.bm.Webimagedownload.class, cascade = {CascadeType.PERSIST, CascadeType.REFRESH, CascadeType.MERGE} )
	private java.util.List<nl.reinders.bm.Webimagedownload> iWebimagedownloadsWhereIAmArticle = new java.util.ArrayList<nl.reinders.bm.Webimagedownload>();

	/** WeblightboxsWhereIAmArticle*/
	public void addWeblightboxsWhereIAmArticle(nl.reinders.bm.Weblightbox value)
	{
		if (value != null && !iWeblightboxsWhereIAmArticle.contains(value))
		{
			iWeblightboxsWhereIAmArticle.add(value);
			value.setArticle( (nl.reinders.bm.Article)this);
		}
	}
	public void removeWeblightboxsWhereIAmArticle(nl.reinders.bm.Weblightbox value)
	{
		if (value != null && iWeblightboxsWhereIAmArticle.contains(value))
		{
			iWeblightboxsWhereIAmArticle.remove(value);
			value.setArticle( (nl.reinders.bm.Article)null );
		}
	}
	public java.util.List<nl.reinders.bm.Weblightbox> getWeblightboxsWhereIAmArticle() { return iWeblightboxsWhereIAmArticle; }
	@OneToMany(mappedBy = "iArticle", fetch = FetchType.LAZY, targetEntity = nl.reinders.bm.Weblightbox.class, cascade = {CascadeType.PERSIST, CascadeType.REFRESH, CascadeType.MERGE} )
	private java.util.List<nl.reinders.bm.Weblightbox> iWeblightboxsWhereIAmArticle = new java.util.ArrayList<nl.reinders.bm.Weblightbox>();


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



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

	/** Articlenr */
	public Integer getArticlenr() { return iArticlenr; }
	public void setArticlenr(Integer value)
	{
		try
		{
			Integer lValue = iArticlenr;
			if (log4j.isDebugEnabled()) log4j.debug("setArticlenr: " + lValue + " -> " + value);
			fireVetoableChange(ARTICLENR_PROPERTY_ID, lValue, value);
			iArticlenr = value;
			firePropertyChange(ARTICLENR_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@Id @GeneratedValue(generator="article.articlenr", strategy=GenerationType.TABLE) @TableGenerator( name="article.articlenr", pkColumnValue="articlenr", table="sequence", pkColumnName="seq_name", valueColumnName="seq_count", initialValue=1, allocationSize=1) @Column(name="articlenr")
	private Integer iArticlenr = null;
	final static public String ARTICLENR_PROPERTY_ID = "articlenr";
	final static public Class ARTICLENR_PROPERTY_CLASS = Integer.class;
	final static public String ARTICLENR_NAME = "Articlenr"; // 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

	/** Sellingprice */
	public java.math.BigDecimal getSellingprice() { return iSellingprice; }
	public void setSellingprice(java.math.BigDecimal value)
	{
		try
		{
			java.math.BigDecimal lValue = iSellingprice;
			if (log4j.isDebugEnabled()) log4j.debug("setSellingprice: " + lValue + " -> " + value);
			fireVetoableChange(SELLINGPRICE_PROPERTY_ID, lValue, value);
			iSellingprice = value;
			firePropertyChange(SELLINGPRICE_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@Column(name="sellingprice")
	private java.math.BigDecimal iSellingprice = null;
	final static public String SELLINGPRICE_PROPERTY_ID = "sellingprice";
	final static public Class SELLINGPRICE_PROPERTY_CLASS = java.math.BigDecimal.class;
	final static public String SELLINGPRICE_NAME = "Sellingprice"; // with this ID you can access the internationalization

	/** Length */
	public Integer getLength() { return iLength; }
	public void setLength(Integer value)
	{
		try
		{
			Integer lValue = iLength;
			if (log4j.isDebugEnabled()) log4j.debug("setLength: " + lValue + " -> " + value);
			fireVetoableChange(LENGTH_PROPERTY_ID, lValue, value);
			iLength = value;
			firePropertyChange(LENGTH_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@Column(name="length")
	private Integer iLength = null;
	final static public String LENGTH_PROPERTY_ID = "length";
	final static public Class LENGTH_PROPERTY_CLASS = Integer.class;
	final static public String LENGTH_NAME = "Length"; // with this ID you can access the internationalization

	/** Width */
	public Integer getWidth() { return iWidth; }
	public void setWidth(Integer value)
	{
		try
		{
			Integer lValue = iWidth;
			if (log4j.isDebugEnabled()) log4j.debug("setWidth: " + lValue + " -> " + value);
			fireVetoableChange(WIDTH_PROPERTY_ID, lValue, value);
			iWidth = value;
			firePropertyChange(WIDTH_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@Column(name="width")
	private Integer iWidth = null;
	final static public String WIDTH_PROPERTY_ID = "width";
	final static public Class WIDTH_PROPERTY_CLASS = Integer.class;
	final static public String WIDTH_NAME = "Width"; // 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 = null;
	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

	/** StdReservation */
	public Integer getStdReservation() { return iStdReservation; }
	public void setStdReservation(Integer value)
	{
		try
		{
			Integer lValue = iStdReservation;
			if (log4j.isDebugEnabled()) log4j.debug("setStdReservation: " + lValue + " -> " + value);
			fireVetoableChange(STDRESERVATION_PROPERTY_ID, lValue, value);
			iStdReservation = value;
			firePropertyChange(STDRESERVATION_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@Column(name="std_reservation")
	private Integer iStdReservation = null;
	final static public String STDRESERVATION_PROPERTY_ID = "stdReservation";
	final static public Class STDRESERVATION_PROPERTY_CLASS = Integer.class;
	final static public String STDRESERVATION_NAME = "StdReservation"; // with this ID you can access the internationalization

	/** Haslicenses */
	public Integer getHaslicenses() { return iHaslicenses; }
	public void setHaslicenses(Integer value)
	{
		try
		{
			Integer lValue = iHaslicenses;
			if (log4j.isDebugEnabled()) log4j.debug("setHaslicenses: " + lValue + " -> " + value);
			fireVetoableChange(HASLICENSES_PROPERTY_ID, lValue, value);
			iHaslicenses = value;
			firePropertyChange(HASLICENSES_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@Column(name="haslicenses")
	private Integer iHaslicenses = null;
	final static public String HASLICENSES_PROPERTY_ID = "haslicenses";
	final static public Class HASLICENSES_PROPERTY_CLASS = Integer.class;
	final static public String HASLICENSES_NAME = "Haslicenses"; // with this ID you can access the internationalization

	/** Minimalstock */
	public Integer getMinimalstock() { return iMinimalstock; }
	public void setMinimalstock(Integer value)
	{
		try
		{
			Integer lValue = iMinimalstock;
			if (log4j.isDebugEnabled()) log4j.debug("setMinimalstock: " + lValue + " -> " + value);
			fireVetoableChange(MINIMALSTOCK_PROPERTY_ID, lValue, value);
			iMinimalstock = value;
			firePropertyChange(MINIMALSTOCK_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@Column(name="minimalstock")
	private Integer iMinimalstock = null;
	final static public String MINIMALSTOCK_PROPERTY_ID = "minimalstock";
	final static public Class MINIMALSTOCK_PROPERTY_CLASS = Integer.class;
	final static public String MINIMALSTOCK_NAME = "Minimalstock"; // with this ID you can access the internationalization

	/** IsLandscape */
	public Integer getIsLandscape() { return iIsLandscape; }
	public void setIsLandscape(Integer value)
	{
		try
		{
			Integer lValue = iIsLandscape;
			if (log4j.isDebugEnabled()) log4j.debug("setIsLandscape: " + lValue + " -> " + value);
			fireVetoableChange(ISLANDSCAPE_PROPERTY_ID, lValue, value);
			iIsLandscape = value;
			firePropertyChange(ISLANDSCAPE_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@Column(name="is_landscape")
	private Integer iIsLandscape = null;
	final static public String ISLANDSCAPE_PROPERTY_ID = "isLandscape";
	final static public Class ISLANDSCAPE_PROPERTY_CLASS = Integer.class;
	final static public String ISLANDSCAPE_NAME = "IsLandscape"; // with this ID you can access the internationalization

	/** Actueel */
	public Integer getActueel() { return iActueel; }
	public void setActueel(Integer value)
	{
		try
		{
			Integer lValue = iActueel;
			if (log4j.isDebugEnabled()) log4j.debug("setActueel: " + lValue + " -> " + value);
			fireVetoableChange(ACTUEEL_PROPERTY_ID, lValue, value);
			iActueel = value;
			firePropertyChange(ACTUEEL_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@Column(name="actueel")
	private Integer iActueel = null;
	final static public String ACTUEEL_PROPERTY_ID = "actueel";
	final static public Class ACTUEEL_PROPERTY_CLASS = Integer.class;
	final static public String ACTUEEL_NAME = "Actueel"; // with this ID you can access the internationalization

	/** Weight */
	public java.math.BigDecimal getWeight() { return iWeight; }
	public void setWeight(java.math.BigDecimal value)
	{
		try
		{
			java.math.BigDecimal lValue = iWeight;
			if (log4j.isDebugEnabled()) log4j.debug("setWeight: " + lValue + " -> " + value);
			fireVetoableChange(WEIGHT_PROPERTY_ID, lValue, value);
			iWeight = value;
			firePropertyChange(WEIGHT_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@Column(name="weight")
	private java.math.BigDecimal iWeight = null;
	final static public String WEIGHT_PROPERTY_ID = "weight";
	final static public Class WEIGHT_PROPERTY_CLASS = java.math.BigDecimal.class;
	final static public String WEIGHT_NAME = "Weight"; // with this ID you can access the internationalization

	/** Ean */
	public java.math.BigDecimal getEan() { return iEan; }
	public void setEan(java.math.BigDecimal value)
	{
		try
		{
			java.math.BigDecimal lValue = iEan;
			if (log4j.isDebugEnabled()) log4j.debug("setEan: " + lValue + " -> " + value);
			fireVetoableChange(EAN_PROPERTY_ID, lValue, value);
			iEan = value;
			firePropertyChange(EAN_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@Column(name="ean")
	private java.math.BigDecimal iEan = null;
	final static public String EAN_PROPERTY_ID = "ean";
	final static public Class EAN_PROPERTY_CLASS = java.math.BigDecimal.class;
	final static public String EAN_NAME = "Ean"; // with this ID you can access the internationalization

	/** C */
	public Integer getC() { return iC; }
	public void setC(Integer value)
	{
		try
		{
			Integer lValue = iC;
			if (log4j.isDebugEnabled()) log4j.debug("setC: " + lValue + " -> " + value);
			fireVetoableChange(C_PROPERTY_ID, lValue, value);
			iC = value;
			firePropertyChange(C_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@Column(name="c")
	private Integer iC = null;
	final static public String C_PROPERTY_ID = "c";
	final static public Class C_PROPERTY_CLASS = Integer.class;
	final static public String C_NAME = "C"; // with this ID you can access the internationalization

	/** F */
	public Integer getF() { return iF; }
	public void setF(Integer value)
	{
		try
		{
			Integer lValue = iF;
			if (log4j.isDebugEnabled()) log4j.debug("setF: " + lValue + " -> " + value);
			fireVetoableChange(F_PROPERTY_ID, lValue, value);
			iF = value;
			firePropertyChange(F_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@Column(name="f")
	private Integer iF = null;
	final static public String F_PROPERTY_ID = "f";
	final static public Class F_PROPERTY_CLASS = Integer.class;
	final static public String F_NAME = "F"; // with this ID you can access the internationalization

	/** Info */
	public String getInfo() { return iInfo; }
	public void setInfo(String value)
	{
		try
		{
			String lValue = iInfo;
			if (log4j.isDebugEnabled()) log4j.debug("setInfo: " + lValue + " -> " + value);
			fireVetoableChange(INFO_PROPERTY_ID, lValue, value);
			iInfo = value;
			firePropertyChange(INFO_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@Column(name="info")
	private String iInfo = null;
	final static public String INFO_PROPERTY_ID = "info";
	final static public Class INFO_PROPERTY_CLASS = String.class;
	final static public String INFO_NAME = "Info"; // with this ID you can access the internationalization

	/** Rolinstellingenok */
	public Integer getRolinstellingenok() { return iRolinstellingenok; }
	public void setRolinstellingenok(Integer value)
	{
		try
		{
			Integer lValue = iRolinstellingenok;
			if (log4j.isDebugEnabled()) log4j.debug("setRolinstellingenok: " + lValue + " -> " + value);
			fireVetoableChange(ROLINSTELLINGENOK_PROPERTY_ID, lValue, value);
			iRolinstellingenok = value;
			firePropertyChange(ROLINSTELLINGENOK_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@Column(name="rolinstellingenok")
	private Integer iRolinstellingenok = null;
	final static public String ROLINSTELLINGENOK_PROPERTY_ID = "rolinstellingenok";
	final static public Class ROLINSTELLINGENOK_PROPERTY_CLASS = Integer.class;
	final static public String ROLINSTELLINGENOK_NAME = "Rolinstellingenok"; // with this ID you can access the internationalization

	/** Rolkop */
	public Integer getRolkop() { return iRolkop; }
	public void setRolkop(Integer value)
	{
		try
		{
			Integer lValue = iRolkop;
			if (log4j.isDebugEnabled()) log4j.debug("setRolkop: " + lValue + " -> " + value);
			fireVetoableChange(ROLKOP_PROPERTY_ID, lValue, value);
			iRolkop = value;
			firePropertyChange(ROLKOP_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@Column(name="rolkop")
	private Integer iRolkop = null;
	final static public String ROLKOP_PROPERTY_ID = "rolkop";
	final static public Class ROLKOP_PROPERTY_CLASS = Integer.class;
	final static public String ROLKOP_NAME = "Rolkop"; // with this ID you can access the internationalization

	/** Tapper */
	public Integer getTapper() { return iTapper; }
	public void setTapper(Integer value)
	{
		try
		{
			Integer lValue = iTapper;
			if (log4j.isDebugEnabled()) log4j.debug("setTapper: " + lValue + " -> " + value);
			fireVetoableChange(TAPPER_PROPERTY_ID, lValue, value);
			iTapper = value;
			firePropertyChange(TAPPER_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@Column(name="tapper")
	private Integer iTapper = null;
	final static public String TAPPER_PROPERTY_ID = "tapper";
	final static public Class TAPPER_PROPERTY_CLASS = Integer.class;
	final static public String TAPPER_NAME = "Tapper"; // with this ID you can access the internationalization

	/** Veer */
	public Integer getVeer() { return iVeer; }
	public void setVeer(Integer value)
	{
		try
		{
			Integer lValue = iVeer;
			if (log4j.isDebugEnabled()) log4j.debug("setVeer: " + lValue + " -> " + value);
			fireVetoableChange(VEER_PROPERTY_ID, lValue, value);
			iVeer = value;
			firePropertyChange(VEER_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@Column(name="veer")
	private Integer iVeer = null;
	final static public String VEER_PROPERTY_ID = "veer";
	final static public Class VEER_PROPERTY_CLASS = Integer.class;
	final static public String VEER_NAME = "Veer"; // 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

	/** Managestock */
	public Integer getManagestock() { return iManagestock; }
	public void setManagestock(Integer value)
	{
		try
		{
			Integer lValue = iManagestock;
			if (log4j.isDebugEnabled()) log4j.debug("setManagestock: " + lValue + " -> " + value);
			fireVetoableChange(MANAGESTOCK_PROPERTY_ID, lValue, value);
			iManagestock = value;
			firePropertyChange(MANAGESTOCK_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@Column(name="managestock")
	private Integer iManagestock = null;
	final static public String MANAGESTOCK_PROPERTY_ID = "managestock";
	final static public Class MANAGESTOCK_PROPERTY_CLASS = Integer.class;
	final static public String MANAGESTOCK_NAME = "Managestock"; // with this ID you can access the internationalization

	/** Seqnr */
	public Integer getSeqnr() { return iSeqnr; }
	public void setSeqnr(Integer value)
	{
		try
		{
			Integer lValue = iSeqnr;
			if (log4j.isDebugEnabled()) log4j.debug("setSeqnr: " + lValue + " -> " + value);
			fireVetoableChange(SEQNR_PROPERTY_ID, lValue, value);
			iSeqnr = value;
			firePropertyChange(SEQNR_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@Column(name="seqnr")
	private Integer iSeqnr = null;
	final static public String SEQNR_PROPERTY_ID = "seqnr";
	final static public Class SEQNR_PROPERTY_CLASS = Integer.class;
	final static public String SEQNR_NAME = "Seqnr"; // with this ID you can access the internationalization

	/** Keywords */
	public String getKeywords() { return iKeywords; }
	public void setKeywords(String value)
	{
		try
		{
			String lValue = iKeywords;
			if (log4j.isDebugEnabled()) log4j.debug("setKeywords: " + lValue + " -> " + value);
			fireVetoableChange(KEYWORDS_PROPERTY_ID, lValue, value);
			iKeywords = value;
			firePropertyChange(KEYWORDS_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@Column(name="keywords")
	private String iKeywords = null;
	final static public String KEYWORDS_PROPERTY_ID = "keywords";
	final static public Class KEYWORDS_PROPERTY_CLASS = String.class;
	final static public String KEYWORDS_NAME = "Keywords"; // with this ID you can access the internationalization

	/** Opweb */
	public Integer getOpweb() { return iOpweb; }
	public void setOpweb(Integer value)
	{
		try
		{
			Integer lValue = iOpweb;
			if (log4j.isDebugEnabled()) log4j.debug("setOpweb: " + lValue + " -> " + value);
			fireVetoableChange(OPWEB_PROPERTY_ID, lValue, value);
			iOpweb = value;
			firePropertyChange(OPWEB_PROPERTY_ID, lValue, value);
		}
		catch (java.beans.PropertyVetoException e) { throw new java.lang.IllegalArgumentException("Value vetoed: " + e.getMessage()); }
	}
	@Column(name="opweb")
	private Integer iOpweb = null;
	final static public String OPWEB_PROPERTY_ID = "opweb";
	final static public Class OPWEB_PROPERTY_CLASS = Integer.class;
	final static public String OPWEB_NAME = "Opweb"; // 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


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

	/** clone */
	public Object clone()
	{ 
		nl.reinders.bm.Article lNew = new nl.reinders.bm.Article();
		lNew.setDescription( getDescription() ); 
		lNew.setSellingprice( getSellingprice() ); 
		lNew.setLength( getLength() ); 
		lNew.setWidth( getWidth() ); 
		lNew.setInserted( getInserted() ); 
		lNew.setStdReservation( getStdReservation() ); 
		lNew.setHaslicenses( getHaslicenses() ); 
		lNew.setMinimalstock( getMinimalstock() ); 
		lNew.setIsLandscape( getIsLandscape() ); 
		lNew.setActueel( getActueel() ); 
		lNew.setWeight( getWeight() ); 
		lNew.setEan( getEan() ); 
		lNew.setC( getC() ); 
		lNew.setF( getF() ); 
		lNew.setInfo( getInfo() ); 
		lNew.setRolinstellingenok( getRolinstellingenok() ); 
		lNew.setRolkop( getRolkop() ); 
		lNew.setTapper( getTapper() ); 
		lNew.setVeer( getVeer() ); 
		lNew.setManagestock( getManagestock() ); 
		lNew.setSeqnr( getSeqnr() ); 
		lNew.setKeywords( getKeywords() ); 
		lNew.setOpweb( getOpweb() ); 
		// not cloning this column: lNew.setDwhmodified( getDwhmodified() ); 
		// not cloning this column: lNew.setDwhby( getDwhby() ); 
		return lNew;
	}
	public nl.reinders.bm.Article cloneShallow() { return (nl.reinders.bm.Article)clone();}


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

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


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

	/**
	 * @param articlenr
	 */
	static public nl.reinders.bm.Article findByPK(Integer articlenr)
	{
		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 Article t where t.iArticlenr=:articlenr");
		lQuery.setParameter("articlenr", articlenr);
		java.util.List<nl.reinders.bm.Article> lList = lQuery.getResultList();
	    if (lList.size() == 0) return null;
	    return lList.get(0);
	}

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

	/**
	 * find all entities ordered by
	 */
	static public java.util.List<nl.reinders.bm.Article> 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 Article t" + (orderedBy == null ? "" : " order by t." + orderedBy) + "");
		java.util.List<nl.reinders.bm.Article> lList = lQuery.getResultList();
	    return lList;
	}


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

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



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

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


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