forked from pquiring/javaforce
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTest.java
More file actions
35 lines (28 loc) · 711 Bytes
/
Copy pathTest.java
File metadata and controls
35 lines (28 loc) · 711 Bytes
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
package javaforce.db;
/** TestRow
*
* @author pquiring
*/
public class Test extends Row {
public String value;
private static final int version = 1;
public void readObject() throws Exception {
int ver = readInt();
value = readString();
}
public void writeObject() throws Exception {
writeInt(version);
writeString(value);
}
public static void main(String[] args) {
Table<Test> test = new Table<Test>(() -> {return new Test();});
test.load("test.dat");
Test row = new Test();
row.value = "123";
test.add(row);
test.save();
TableList<Test> list = new TableList<Test>(() -> {return new Test();});
list.load("test");
list.add(test);
}
}