// Collection of code snippets by Arne Vajhøj 
// (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) 
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;

@Entity
@Table(name="toolasset")
@PrimaryKeyJoinColumn(name="id")
public class ToolAssetJPA extends AssetJPA {
    public static final int PERMOPEN = 1;
    public static final int COVERABLE = 2;
    public static final int REALROOF = 3;
    private String toolType;
    private String name;
    private int weight;
    public ToolAssetJPA() {
        this(0, "", "", "", 0);
    }
    public ToolAssetJPA(int id, String description, String toolType, String name, int weight) {
        super(id, description, TOOL);
        this.toolType = toolType;
        this.name = name;
        this.weight = weight;
    }
    @Column(name="tooltype")
    public String getToolType() {
        return toolType;
    }
    public void setToolType(String toolType) {
        this.toolType = toolType;
    }
    @Column(name="name")
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    @Column(name="weight")
    public int getWeight() {
        return weight;
    }
    public void setWeight(int weight) {
        this.weight = weight;
    }
}
