// 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="truckasset")
@PrimaryKeyJoinColumn(name="id")
public class TruckAssetJPA extends AssetJPA {
    private String model;
    private String license;
    private int towcapacity;
    public TruckAssetJPA() {
        this(0, "", "", "", 0);
    }
    public TruckAssetJPA(int id, String description, String model, String license, int towcapacity) {
        super(id, description, TRUCK);
        this.model = model;
        this.license = license;
        this.towcapacity = towcapacity;
    }
    @Column(name="model")
    public String getModel() {
        return model;
    }
    public void setModel(String model) {
        this.model = model;
    }
    @Column(name="license")
    public String getLicense() {
        return license;
    }
    public void setLicense(String license) {
        this.license = license;
    }
    @Column(name="towcapacity")
    public int getTowcapacity() {
        return towcapacity;
    }
    public void setTowcapacity(int towcapacity) {
        this.towcapacity = towcapacity;
    }
}
