// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
package hib.inher.jpa.one;

import javax.persistence.Column;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;

@Entity
@DiscriminatorValue("1")
public class Cat extends Animal {
    private int miceperday;
    @Column(name="miceperday")
    public int getMiceperday() {
        return miceperday;
    }
    public void setMiceperday(int miceperday) {
        this.miceperday = miceperday;
    }
    @Override
    public String toString() {
        return "I am a cat with id " + getId() + ", name " + getName() + " and eating " + getMiceperday() + " mice per day";
    }
}
