KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sleepycat > persist > test > Enhanced2


1 /*-
2  * See the file LICENSE for redistribution information.
3  *
4  * Copyright (c) 2002,2006 Oracle. All rights reserved.
5  *
6  * $Id: Enhanced2.java,v 1.5 2006/10/30 21:14:55 bostic Exp $
7  */

8
9 package com.sleepycat.persist.test;
10
11 import com.sleepycat.persist.impl.EnhancedAccessor;
12 import com.sleepycat.persist.impl.EntityInput;
13 import com.sleepycat.persist.impl.EntityOutput;
14 import com.sleepycat.persist.impl.Format;
15 import com.sleepycat.persist.model.Persistent;
16
17 /**
18  * For running ASMifier -- entity sublcass.
19  */

20 @Persistent
21 class Enhanced2 extends Enhanced1 {
22
23     static {
24         EnhancedAccessor.registerClass(null, new Enhanced2());
25     }
26
27     public Object JavaDoc bdbNewInstance() {
28         return new Enhanced2();
29     }
30     
31     public Object JavaDoc bdbNewArray(int len) {
32         return new Enhanced2[len];
33     }
34
35     public boolean bdbIsPriKeyFieldNullOrZero() {
36         return super.bdbIsPriKeyFieldNullOrZero();
37     }
38
39     public void bdbWritePriKeyField(EntityOutput output, Format format) {
40         super.bdbWritePriKeyField(output, format);
41     }
42
43     public void bdbReadPriKeyField(EntityInput input, Format format) {
44         super.bdbReadPriKeyField(input, format);
45     }
46
47     public void bdbWriteSecKeyFields(EntityOutput output) {
48         super.bdbWriteSecKeyFields(output);
49     }
50
51     public void bdbReadSecKeyFields(EntityInput input,
52                                     int startField,
53                                     int endField,
54                                     int superLevel) {
55         if (superLevel != 0) {
56             super.bdbReadSecKeyFields
57                 (input, startField, endField, superLevel - 1);
58         }
59     }
60
61     public void bdbWriteNonKeyFields(EntityOutput output) {
62         super.bdbWriteNonKeyFields(output);
63     }
64
65     public void bdbReadNonKeyFields(EntityInput input,
66                                     int startField,
67                                     int endField,
68                                     int superLevel) {
69         if (superLevel != 0) {
70             super.bdbReadNonKeyFields
71                 (input, startField, endField, superLevel - 1);
72         }
73     }
74
75     public boolean bdbNullifyKeyField(Object JavaDoc o,
76                                       int field,
77                                       int superLevel,
78                                       boolean isSecField,
79                                       Object JavaDoc keyElement) {
80         if (superLevel > 0) {
81             return super.bdbNullifyKeyField
82                 (o, field, superLevel - 1, isSecField, keyElement);
83         } else {
84             return false;
85         }
86     }
87
88     public Object JavaDoc bdbGetField(Object JavaDoc o,
89                               int field,
90                               int superLevel,
91                               boolean isSecField) {
92         if (superLevel > 0) {
93             return super.bdbGetField
94                 (o, field, superLevel - 1, isSecField);
95         } else {
96             return null;
97         }
98     }
99
100     public void bdbSetField(Object JavaDoc o,
101                             int field,
102                             int superLevel,
103                             boolean isSecField,
104                             Object JavaDoc value) {
105         if (superLevel > 0) {
106             super.bdbSetField
107                 (o, field, superLevel - 1, isSecField, value);
108         }
109     }
110 }
111
Popular Tags