// Collection of code snippets by Arne Vajhøj 
// (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) 
import com.sleepycat.persist.model.Entity;
import com.sleepycat.persist.model.PrimaryKey;
import com.sleepycat.persist.model.Relationship;
import com.sleepycat.persist.model.SecondaryKey;

@Entity
public class BaseData {
    @PrimaryKey
    private int id;
    @SecondaryKey(relate=Relationship.MANY_TO_ONE)
    private String name;
    @SecondaryKey(relate=Relationship.MANY_TO_ONE)
    private String address;
    private int value;
    public BaseData() {
        this(0, "", "", 0);
    }
    public BaseData(int id, String name, String address, int value) {
        super();
        this.id = id;
        this.name = name;
        this.address = address;
        this.value = value;
    }
    public int getId() {
        return id;
    }
    public void setId(int id) {
        this.id = id;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getAddress() {
        return address;
    }
    public void setAddress(String address) {
        this.address = address;
    }
    public int getValue() {
        return value;
    }
    public void setValue(int value) {
        this.value = value;
    }
}

