// 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 demo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name="t")
public class OnlyTwoFields {
    private int f1;
    private String f2;
    public OnlyTwoFields() {
        this(0, "");
    }
    public OnlyTwoFields(int f1, String f2) {
        this.f1 = f1;
        this.f2 = f2;
    }
    @Id
    @Column(name="f1")
    public int getF1() {
        return f1;
    }
    public void setF1(int f1) {
        this.f1 = f1;
    }
    @Column(name="f2")
    public String getF2() {
        return f2;
    }
    public void setF2(String f2) {
        this.f2 = f2;
    }
    @Override
    public String toString() {
        return String.format("OnlyTwo (%d,%s)", f1, f2);
    }
}
