1 10 11 package com.triactive.jdo; 12 13 import javax.jdo.JDOFatalInternalException; 14 15 16 public abstract class AbstractFieldManager implements FieldManager 17 { 18 public AbstractFieldManager() 19 { 20 } 21 22 private String failureMessage(String method) 23 { 24 return "Somehow " + getClass().getName() + "." + method + "() was called, which should have been impossible"; 25 } 26 27 public void storeBooleanField(int fieldNumber, boolean value) 28 { 29 throw new JDOFatalInternalException(failureMessage("storeBooleanField")); 30 } 31 32 public boolean fetchBooleanField(int fieldNumber) 33 { 34 throw new JDOFatalInternalException(failureMessage("fetchBooleanField")); 35 } 36 37 public void storeCharField(int fieldNumber, char value) 38 { 39 throw new JDOFatalInternalException(failureMessage("storeCharField")); 40 } 41 42 public char fetchCharField(int fieldNumber) 43 { 44 throw new JDOFatalInternalException(failureMessage("fetchCharField")); 45 } 46 47 public void storeByteField(int fieldNumber, byte value) 48 { 49 throw new JDOFatalInternalException(failureMessage("storeByteField")); 50 } 51 52 public byte fetchByteField(int fieldNumber) 53 { 54 throw new JDOFatalInternalException(failureMessage("fetchByteField")); 55 } 56 57 public void storeShortField(int fieldNumber, short value) 58 { 59 throw new JDOFatalInternalException(failureMessage("storeShortField")); 60 } 61 62 public short fetchShortField(int fieldNumber) 63 { 64 throw new JDOFatalInternalException(failureMessage("fetchShortField")); 65 } 66 67 public void storeIntField(int fieldNumber, int value) 68 { 69 throw new JDOFatalInternalException(failureMessage("storeIntField")); 70 } 71 72 public int fetchIntField(int fieldNumber) 73 { 74 throw new JDOFatalInternalException(failureMessage("fetchIntField")); 75 } 76 77 public void storeLongField(int fieldNumber, long value) 78 { 79 throw new JDOFatalInternalException(failureMessage("storeLongField")); 80 } 81 82 public long fetchLongField(int fieldNumber) 83 { 84 throw new JDOFatalInternalException(failureMessage("fetchLongField")); 85 } 86 87 public void storeFloatField(int fieldNumber, float value) 88 { 89 throw new JDOFatalInternalException(failureMessage("storeFloatField")); 90 } 91 92 public float fetchFloatField(int fieldNumber) 93 { 94 throw new JDOFatalInternalException(failureMessage("fetchFloatField")); 95 } 96 97 public void storeDoubleField(int fieldNumber, double value) 98 { 99 throw new JDOFatalInternalException(failureMessage("storeDoubleField")); 100 } 101 102 public double fetchDoubleField(int fieldNumber) 103 { 104 throw new JDOFatalInternalException(failureMessage("fetchDoubleField")); 105 } 106 107 public void storeStringField(int fieldNumber, String value) 108 { 109 throw new JDOFatalInternalException(failureMessage("storeStringField")); 110 } 111 112 public String fetchStringField(int fieldNumber) 113 { 114 throw new JDOFatalInternalException(failureMessage("fetchStringField")); 115 } 116 117 public void storeObjectField(int fieldNumber, Object value) 118 { 119 throw new JDOFatalInternalException(failureMessage("storeObjectField")); 120 } 121 122 public Object fetchObjectField(int fieldNumber) 123 { 124 throw new JDOFatalInternalException(failureMessage("fetchObjectField")); 125 } 126 } 127 | Popular Tags |