01: /*-
02: * See the file LICENSE for redistribution information.
03: *
04: * Copyright (c) 2002,2008 Oracle. All rights reserved.
05: *
06: * $Id: Enhanced2.java,v 1.5.2.3 2008/01/07 15:14:35 cwl Exp $
07: */
08:
09: 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 bdbNewInstance() {
28: return new Enhanced2();
29: }
30:
31: public Object 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, int startField,
52: int endField, int super Level) {
53: if (super Level != 0) {
54: super .bdbReadSecKeyFields(input, startField, endField,
55: super Level - 1);
56: }
57: }
58:
59: public void bdbWriteNonKeyFields(EntityOutput output) {
60: super .bdbWriteNonKeyFields(output);
61: }
62:
63: public void bdbReadNonKeyFields(EntityInput input, int startField,
64: int endField, int super Level) {
65: if (super Level != 0) {
66: super .bdbReadNonKeyFields(input, startField, endField,
67: super Level - 1);
68: }
69: }
70:
71: public boolean bdbNullifyKeyField(Object o, int field,
72: int super Level, boolean isSecField, Object keyElement) {
73: if (super Level > 0) {
74: return super .bdbNullifyKeyField(o, field, super Level - 1,
75: isSecField, keyElement);
76: } else {
77: return false;
78: }
79: }
80:
81: public Object bdbGetField(Object o, int field, int super Level,
82: boolean isSecField) {
83: if (super Level > 0) {
84: return super .bdbGetField(o, field, super Level - 1,
85: isSecField);
86: } else {
87: return null;
88: }
89: }
90:
91: public void bdbSetField(Object o, int field, int super Level,
92: boolean isSecField, Object value) {
93: if (super Level > 0) {
94: super .bdbSetField(o, field, super Level - 1, isSecField,
95: value);
96: }
97: }
98: }
|