// 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="trailerasset")
@PrimaryKeyJoinColumn(name="id")
public class TrailerAssetJPA extends AssetJPA {
    private int ownWeight;
    private int maxCargo;
    private int roof;
    public TrailerAssetJPA() {
        this(0, "", 0, 0, 0);
    }
    public TrailerAssetJPA(int id, String description, int ownWeight, int maxCargo, int roof) {
        super(id, description, TRAILER);
        this.ownWeight = ownWeight;
        this.maxCargo = maxCargo;
        this.roof = roof;
    }
    @Column(name="ownweight")
    public int getOwnWeight() {
        return ownWeight;
    }
    public void setOwnWeight(int ownWeight) {
        this.ownWeight = ownWeight;
    }
    @Column(name="maxcargo")
    public int getMaxCargo() {
        return maxCargo;
    }
    public void setMaxCargo(int maxCargo) {
        this.maxCargo = maxCargo;
    }
    @Column(name="roof")
    public int getRoof() {
        return roof;
    }
    public void setRoof(int roof) {
        this.roof = roof;
    }
}
