• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/timemachine/db-4.7.25.NC/examples_java/src/persist/gettingStarted/
1package persist.gettingStarted;
2
3import com.sleepycat.persist.model.Entity;
4import com.sleepycat.persist.model.PrimaryKey;
5import static com.sleepycat.persist.model.Relationship.*;
6import com.sleepycat.persist.model.SecondaryKey;
7
8@Entity
9public class SimpleEntityClass {
10
11    // Primary key is pKey
12    @PrimaryKey
13    private String pKey;
14
15    // Secondary key is the sKey
16    @SecondaryKey(relate=MANY_TO_ONE)
17    private String sKey;
18
19    public void setpKey(String data) {
20        pKey = data;
21    }
22
23    public void setsKey(String data) {
24        sKey = data;
25    }
26
27    public String getpKey() {
28        return pKey;
29    }
30
31    public String getsKey() {
32        return sKey;
33    }
34}
35