// Collection of code snippets by Arne Vajhøj 
// (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) 
import dk.vajhoej.isam.KeyField;
import dk.vajhoej.record.FieldType;
import dk.vajhoej.record.Struct;
import dk.vajhoej.record.StructField;

@Struct
public class DataRec {
    @KeyField(n=0)
    @StructField(n=0, type=FieldType.FIXSTR, length=4)
    private String id;
    @StructField(n=1, type=FieldType.INT4)
    private int val;
    public DataRec() {
        this("    ", 0);
    }
    public DataRec(String id, int val) {
        this.id = id;
        this.val = val;
    }
    public String getId() {
        return id;
    }
    public int getVal() {
        return val;
    }
}
