001: /*
002: * Copyright 2002 (C) TJDO.
003: * All rights reserved.
004: *
005: * This software is distributed under the terms of the TJDO License version 1.0.
006: * See the terms of the TJDO License in the documentation provided with this software.
007: *
008: * $Id: AbstractFieldManager.java,v 1.2 2002/10/17 21:00:51 pierreg0 Exp $
009: */
010:
011: package com.triactive.jdo;
012:
013: import javax.jdo.JDOFatalInternalException;
014:
015: public abstract class AbstractFieldManager implements FieldManager {
016: public AbstractFieldManager() {
017: }
018:
019: private String failureMessage(String method) {
020: return "Somehow " + getClass().getName() + "." + method
021: + "() was called, which should have been impossible";
022: }
023:
024: public void storeBooleanField(int fieldNumber, boolean value) {
025: throw new JDOFatalInternalException(
026: failureMessage("storeBooleanField"));
027: }
028:
029: public boolean fetchBooleanField(int fieldNumber) {
030: throw new JDOFatalInternalException(
031: failureMessage("fetchBooleanField"));
032: }
033:
034: public void storeCharField(int fieldNumber, char value) {
035: throw new JDOFatalInternalException(
036: failureMessage("storeCharField"));
037: }
038:
039: public char fetchCharField(int fieldNumber) {
040: throw new JDOFatalInternalException(
041: failureMessage("fetchCharField"));
042: }
043:
044: public void storeByteField(int fieldNumber, byte value) {
045: throw new JDOFatalInternalException(
046: failureMessage("storeByteField"));
047: }
048:
049: public byte fetchByteField(int fieldNumber) {
050: throw new JDOFatalInternalException(
051: failureMessage("fetchByteField"));
052: }
053:
054: public void storeShortField(int fieldNumber, short value) {
055: throw new JDOFatalInternalException(
056: failureMessage("storeShortField"));
057: }
058:
059: public short fetchShortField(int fieldNumber) {
060: throw new JDOFatalInternalException(
061: failureMessage("fetchShortField"));
062: }
063:
064: public void storeIntField(int fieldNumber, int value) {
065: throw new JDOFatalInternalException(
066: failureMessage("storeIntField"));
067: }
068:
069: public int fetchIntField(int fieldNumber) {
070: throw new JDOFatalInternalException(
071: failureMessage("fetchIntField"));
072: }
073:
074: public void storeLongField(int fieldNumber, long value) {
075: throw new JDOFatalInternalException(
076: failureMessage("storeLongField"));
077: }
078:
079: public long fetchLongField(int fieldNumber) {
080: throw new JDOFatalInternalException(
081: failureMessage("fetchLongField"));
082: }
083:
084: public void storeFloatField(int fieldNumber, float value) {
085: throw new JDOFatalInternalException(
086: failureMessage("storeFloatField"));
087: }
088:
089: public float fetchFloatField(int fieldNumber) {
090: throw new JDOFatalInternalException(
091: failureMessage("fetchFloatField"));
092: }
093:
094: public void storeDoubleField(int fieldNumber, double value) {
095: throw new JDOFatalInternalException(
096: failureMessage("storeDoubleField"));
097: }
098:
099: public double fetchDoubleField(int fieldNumber) {
100: throw new JDOFatalInternalException(
101: failureMessage("fetchDoubleField"));
102: }
103:
104: public void storeStringField(int fieldNumber, String value) {
105: throw new JDOFatalInternalException(
106: failureMessage("storeStringField"));
107: }
108:
109: public String fetchStringField(int fieldNumber) {
110: throw new JDOFatalInternalException(
111: failureMessage("fetchStringField"));
112: }
113:
114: public void storeObjectField(int fieldNumber, Object value) {
115: throw new JDOFatalInternalException(
116: failureMessage("storeObjectField"));
117: }
118:
119: public Object fetchObjectField(int fieldNumber) {
120: throw new JDOFatalInternalException(
121: failureMessage("fetchObjectField"));
122: }
123: }
|