1 23 24 25 package com.sun.jdo.api.persistence.enhancer.meta; 26 27 import com.sun.jdo.api.persistence.enhancer.util.Support; 28 29 30 public final class JDOMetaDataTimer 32 extends Support 33 implements JDOMetaData 34 { 35 final protected JDOMetaData delegate; 37 38 41 public JDOMetaDataTimer(JDOMetaData delegate) 42 throws JDOMetaDataUserException, JDOMetaDataFatalError 43 { 44 affirm(delegate); 45 this.delegate = delegate; 46 } 47 48 public boolean isPersistenceCapableClass(String classPath) 49 throws JDOMetaDataUserException, JDOMetaDataFatalError 50 { 51 try { 52 timer.push("JDOMetaData.isPersistenceCapableClass(String)", "JDOMetaData.isPersistenceCapableClass(" + classPath + ")"); return delegate.isPersistenceCapableClass(classPath); 55 } finally { 56 timer.pop(); 57 } 58 } 59 60 public boolean isTransientClass(String classPath) 61 throws JDOMetaDataUserException, JDOMetaDataFatalError 62 { 63 try { 64 timer.push("JDOMetaData.isTransientClass(String)", "JDOMetaData.isTransientClass(" + classPath + ")"); return delegate.isTransientClass(classPath); 67 } finally { 68 timer.pop(); 69 } 70 } 71 72 public boolean isPersistenceCapableRootClass(String classPath) 73 throws JDOMetaDataUserException, JDOMetaDataFatalError 74 { 75 try { 76 timer.push("JDOMetaData.isPersistenceCapableRootClass(String)", "JDOMetaData.isPersistenceCapableRootClass(" + classPath + ")"); return delegate.isPersistenceCapableRootClass(classPath); 79 } finally { 80 timer.pop(); 81 } 82 } 83 84 public String getSuperClass(String classPath) 85 throws JDOMetaDataUserException, JDOMetaDataFatalError 86 { 87 try { 88 timer.push("JDOMetaData.getSuperClass(String)", "JDOMetaData.getSuperClass(" + classPath + ")"); return delegate.getSuperClass(classPath); 91 } finally { 92 timer.pop(); 93 } 94 } 95 96 public String getPersistenceCapableRootClass(String classPath) 97 throws JDOMetaDataUserException, JDOMetaDataFatalError 98 { 99 try { 100 timer.push("JDOMetaData.getPersistenceCapableRootClass(String)", "JDOMetaData.getPersistenceCapableRootClass(" + classPath + ")"); return delegate.getPersistenceCapableRootClass(classPath); 103 } finally { 104 timer.pop(); 105 } 106 } 107 108 public boolean isSecondClassObjectType(String classPath) 109 throws JDOMetaDataUserException, JDOMetaDataFatalError 110 { 111 try { 112 timer.push("JDOMetaData.isSecondClassObjectType(String)", "JDOMetaData.isSecondClassObjectType(" + classPath + ")"); return delegate.isSecondClassObjectType(classPath); 115 } finally { 116 timer.pop(); 117 } 118 } 119 120 public boolean isMutableSecondClassObjectType(String classPath) 121 throws JDOMetaDataUserException, JDOMetaDataFatalError 122 { 123 try { 124 timer.push("JDOMetaData.isMutableSecondClassObjectType(String)", "JDOMetaData.isMutableSecondClassObjectType(" + classPath + ")"); return delegate.isMutableSecondClassObjectType(classPath); 127 } finally { 128 timer.pop(); 129 } 130 } 131 132 public boolean isPersistentField(String classPath, String fieldName) 133 throws JDOMetaDataUserException, JDOMetaDataFatalError 134 { 135 try { 136 timer.push("JDOMetaData.isPersistentField(String,String)", "JDOMetaData.isPersistentField(" + classPath + ", " + fieldName + ")"); return delegate.isPersistentField(classPath, fieldName); 140 } finally { 141 timer.pop(); 142 } 143 } 144 145 public boolean isTransactionalField(String classPath, String fieldName) 146 throws JDOMetaDataUserException, JDOMetaDataFatalError 147 { 148 try { 149 timer.push("JDOMetaData.isTransactionalField(String,String)", "JDOMetaData.isTransactionalField(" + classPath + ", " + fieldName + ")"); return delegate.isTransactionalField(classPath, fieldName); 153 } finally { 154 timer.pop(); 155 } 156 } 157 158 public boolean isPrimaryKeyField(String classPath, String fieldName) 159 throws JDOMetaDataUserException, JDOMetaDataFatalError 160 { 161 try { 162 timer.push("JDOMetaData.isPrimaryKeyField(String,String)", "JDOMetaData.isPrimaryKeyField(" + classPath + ", " + fieldName + ")"); return delegate.isPrimaryKeyField(classPath, fieldName); 166 } finally { 167 timer.pop(); 168 } 169 } 170 171 public boolean isDefaultFetchGroupField(String classPath, String fieldName) 172 throws JDOMetaDataUserException, JDOMetaDataFatalError 173 { 174 try { 175 timer.push("JDOMetaData.isDefaultFetchGroupField(String,fieldName)", "JDOMetaData.isDefaultFetchGroupField(" + classPath + ", " + fieldName + ")"); return delegate.isDefaultFetchGroupField(classPath, fieldName); 179 } finally { 180 timer.pop(); 181 } 182 } 183 184 public int getFieldNo(String classPath, String fieldName) 185 throws JDOMetaDataUserException, JDOMetaDataFatalError 186 { 187 try { 188 timer.push("JDOMetaData.getFieldNo(String, String)", "JDOMetaData.getFieldNo(" + classPath + ", " + fieldName + ")"); return delegate.getFieldNo(classPath, fieldName); 192 } finally { 193 timer.pop(); 194 } 195 } 196 197 public String [] getManagedFields(String classPath) 198 throws JDOMetaDataUserException, JDOMetaDataFatalError 199 { 200 try { 201 timer.push("JDOMetaData.getPersistentFields(String)", "JDOMetaData.getPersistentFields(" + classPath + ")"); return delegate.getManagedFields(classPath); 204 } finally { 205 timer.pop(); 206 } 207 } 208 } 209 | Popular Tags |