2010-10-01 21:52:51 +02:00
|
|
|
package de.hsadmin.mods.pac;
|
|
|
|
|
2013-05-13 19:52:13 +02:00
|
|
|
import static javax.persistence.GenerationType.SEQUENCE;
|
|
|
|
|
2010-10-01 21:52:51 +02:00
|
|
|
import java.io.Serializable;
|
|
|
|
|
2010-10-06 15:06:01 +02:00
|
|
|
import javax.persistence.Column;
|
|
|
|
import javax.persistence.Entity;
|
2013-05-13 19:52:13 +02:00
|
|
|
import javax.persistence.GeneratedValue;
|
2010-10-06 15:06:01 +02:00
|
|
|
import javax.persistence.Id;
|
2011-03-22 23:02:06 +01:00
|
|
|
import javax.persistence.JoinColumn;
|
|
|
|
import javax.persistence.ManyToOne;
|
2013-05-13 19:52:13 +02:00
|
|
|
import javax.persistence.SequenceGenerator;
|
2010-10-06 15:06:01 +02:00
|
|
|
import javax.persistence.Table;
|
2010-10-01 21:52:51 +02:00
|
|
|
|
2010-10-06 15:06:01 +02:00
|
|
|
@Entity(name = "Components")
|
|
|
|
@Table(name = "component")
|
2013-05-13 19:52:13 +02:00
|
|
|
@SequenceGenerator(name = "CompSeqGen", sequenceName = "component_id_seq")
|
2010-10-01 21:52:51 +02:00
|
|
|
public class Component implements Serializable {
|
|
|
|
|
|
|
|
private static final long serialVersionUID = 970709621200712794L;
|
|
|
|
|
2010-10-06 15:06:01 +02:00
|
|
|
@Id
|
2013-05-13 19:52:13 +02:00
|
|
|
@GeneratedValue(strategy = SEQUENCE, generator = "CompSeqGen")
|
|
|
|
@Column(name = "component_id", columnDefinition = "integer")
|
|
|
|
private long componentId;
|
2010-10-01 21:52:51 +02:00
|
|
|
|
2011-03-22 23:02:06 +01:00
|
|
|
@ManyToOne
|
|
|
|
@JoinColumn(name="basecomponent_id")
|
2010-10-01 21:52:51 +02:00
|
|
|
private BaseComponent baseComponent;
|
|
|
|
|
2013-05-13 19:52:13 +02:00
|
|
|
@ManyToOne
|
|
|
|
@JoinColumn(name="basepacket_id")
|
|
|
|
private BasePac basePacket;
|
|
|
|
|
2013-04-18 11:57:16 +02:00
|
|
|
@Column(name = "article_number", columnDefinition = "integer", nullable=false)
|
|
|
|
private int articleNumber;
|
|
|
|
|
2010-10-06 15:06:01 +02:00
|
|
|
@Column(name = "min_quantity", columnDefinition = "integer")
|
2010-10-01 21:52:51 +02:00
|
|
|
private int minimumQuantity;
|
|
|
|
|
2010-10-06 15:06:01 +02:00
|
|
|
@Column(name = "max_quantity", columnDefinition = "integer")
|
2010-10-01 21:52:51 +02:00
|
|
|
private int maximimumQuantity;
|
|
|
|
|
2010-10-06 15:06:01 +02:00
|
|
|
@Column(name = "default_quantity", columnDefinition = "integer")
|
2010-10-01 21:52:51 +02:00
|
|
|
private int defaultQuantity;
|
|
|
|
|
2010-10-06 15:06:01 +02:00
|
|
|
@Column(name = "increment_quantity", columnDefinition = "integer")
|
2010-10-01 21:52:51 +02:00
|
|
|
private int incrementQuantity;
|
|
|
|
|
2010-10-06 15:06:01 +02:00
|
|
|
@Column(name = "include_quantity", columnDefinition = "integer")
|
2010-10-01 21:52:51 +02:00
|
|
|
private int includedQuantity;
|
|
|
|
|
2010-10-06 15:06:01 +02:00
|
|
|
@Column(name = "admin_only", columnDefinition = "boolean")
|
2010-10-01 21:52:51 +02:00
|
|
|
private boolean adminOnly;
|
|
|
|
|
|
|
|
public BaseComponent getBaseComponent() {
|
|
|
|
return baseComponent;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setBaseComponent(BaseComponent baseComponent) {
|
|
|
|
this.baseComponent = baseComponent;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int getMinimumQuantity() {
|
|
|
|
return minimumQuantity;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setMinimumQuantity(int minimumQuantity) {
|
|
|
|
this.minimumQuantity = minimumQuantity;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int getMaximimumQuantity() {
|
|
|
|
return maximimumQuantity;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setMaximimumQuantity(int maximimumQuantity) {
|
|
|
|
this.maximimumQuantity = maximimumQuantity;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int getDefaultQuantity() {
|
|
|
|
return defaultQuantity;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setDefaultQuantity(int defiautoQuantity) {
|
|
|
|
this.defaultQuantity = defiautoQuantity;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int getIncrementQuantity() {
|
|
|
|
return incrementQuantity;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setIncrementQuantity(int incrementQuantity) {
|
|
|
|
this.incrementQuantity = incrementQuantity;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int getIncludedQuantity() {
|
|
|
|
return includedQuantity;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setIncludedQuantity(int includedQuantity) {
|
|
|
|
this.includedQuantity = includedQuantity;
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean isAdminOnly() {
|
|
|
|
return adminOnly;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setAdminOnly(boolean adminOnly) {
|
|
|
|
this.adminOnly = adminOnly;
|
|
|
|
}
|
|
|
|
|
2013-04-18 11:57:16 +02:00
|
|
|
public int getArticleNumber() {
|
|
|
|
return articleNumber;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setArticleNumber(int articleNumber) {
|
|
|
|
this.articleNumber = articleNumber;
|
|
|
|
}
|
|
|
|
|
2013-05-13 19:52:13 +02:00
|
|
|
public long getComponentId() {
|
|
|
|
return componentId;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setComponentId(long componentId) {
|
|
|
|
this.componentId = componentId;
|
|
|
|
}
|
|
|
|
|
|
|
|
public BasePac getBasePacket() {
|
|
|
|
return basePacket;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setBasePacket(BasePac basePacket) {
|
|
|
|
this.basePacket = basePacket;
|
|
|
|
}
|
|
|
|
|
2010-10-01 21:52:51 +02:00
|
|
|
}
|