blob: c4c0d81f1989bba9721ce237f1cf08d721155843 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
/*-
* See the file LICENSE for redistribution information.
*
* Copyright (c) 2008-2009 Oracle. All rights reserved.
*
* $Id$
*/
package persist.gettingStarted;
import com.sleepycat.persist.model.Entity;
import com.sleepycat.persist.model.PrimaryKey;
import static com.sleepycat.persist.model.Relationship.*;
import com.sleepycat.persist.model.SecondaryKey;
@Entity
public class SimpleEntityClass {
// Primary key is pKey
@PrimaryKey
private String pKey;
// Secondary key is the sKey
@SecondaryKey(relate=MANY_TO_ONE)
private String sKey;
public void setpKey(String data) {
pKey = data;
}
public void setsKey(String data) {
sKey = data;
}
public String getpKey() {
return pKey;
}
public String getsKey() {
return sKey;
}
}
|