hs.hsadmin/hsarback/src/de/hsadmin/mods/pac/Component.java

118 lines
2.8 KiB
Java

package de.hsadmin.mods.pac;
import java.io.Serializable;
import javax.persistence.IdClass;
@javax.persistence.Entity(name = "Components")
@javax.persistence.Table(name = "component")
@IdClass(ComponentId.class)
public class Component implements Serializable {
private static final long serialVersionUID = 970709621200712794L;
@javax.persistence.Id
private BasePac basePac;
@javax.persistence.Id
private BaseComponent baseComponent;
@javax.persistence.Column(name = "min_quantity", columnDefinition = "integer")
private int minimumQuantity;
@javax.persistence.Column(name = "max_quantity", columnDefinition = "integer")
private int maximimumQuantity;
@javax.persistence.Column(name = "default_quantity", columnDefinition = "integer")
private int defaultQuantity;
@javax.persistence.Column(name = "increment_quantity", columnDefinition = "integer")
private int incrementQuantity;
@javax.persistence.Column(name = "include_quantity", columnDefinition = "integer")
private int includedQuantity;
@javax.persistence.Column(name = "admin_only", columnDefinition = "boolean")
private boolean adminOnly;
public Component() {
}
public Component(BasePac basePac, BaseComponent baseComp, int min, int max,
int def, int incr, int incl, boolean adminOnly) {
this.basePac = basePac;
this.baseComponent = baseComp;
this.minimumQuantity = min;
this.maximimumQuantity = max;
this.defaultQuantity = def;
this.incrementQuantity = incr;
this.includedQuantity = incl;
this.adminOnly = adminOnly;
}
public BasePac getBasePac() {
return basePac;
}
public void setBasePac(BasePac basePac) {
this.basePac = basePac;
}
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;
}
}