01: package com.db4o.f1.chapter6;
02:
03: public class NotStorable {
04: private int id;
05: private String name;
06: private transient int length;
07:
08: public NotStorable(int id, String name) {
09: this .id = id;
10: this .name = name;
11: this .length = name.length();
12: }
13:
14: public int getId() {
15: return id;
16: }
17:
18: public String getName() {
19: return name;
20: }
21:
22: public int getLength() {
23: return length;
24: }
25:
26: public String toString() {
27: return id + "/" + name + ": " + length;
28: }
29: }
|