1 22 package org.jboss.ejb.plugins.cmp.jdbc.metadata; 23 24 import java.lang.reflect.Method ; 25 26 36 public final class JDBCAutomaticQueryMetaData implements JDBCQueryMetaData 37 { 38 41 private final Method method; 42 43 46 private final JDBCReadAheadMetaData readAhead; 47 48 private final Class compiler; 49 50 private final boolean lazyResultSetLoading; 51 52 59 public JDBCAutomaticQueryMetaData(Method method, JDBCReadAheadMetaData readAhead, Class qlCompiler, boolean lazyResultSetLoading) 60 { 61 this.method = method; 62 this.readAhead = readAhead; 63 this.compiler = qlCompiler; 64 this.lazyResultSetLoading = lazyResultSetLoading; 65 } 66 67 public Method getMethod() 68 { 69 return method; 70 } 71 72 public boolean isResultTypeMappingLocal() 73 { 74 return false; 75 } 76 77 82 public JDBCReadAheadMetaData getReadAhead() 83 { 84 return readAhead; 85 } 86 87 public Class getQLCompilerClass() 88 { 89 return compiler; 90 } 91 92 public boolean isLazyResultSetLoading() 93 { 94 return lazyResultSetLoading; 95 } 96 97 105 public boolean equals(Object o) 106 { 107 if(o instanceof JDBCAutomaticQueryMetaData) 108 { 109 return ((JDBCAutomaticQueryMetaData) o).method.equals(method); 110 } 111 return false; 112 } 113 114 120 public int hashCode() 121 { 122 return method.hashCode(); 123 } 124 125 134 public String toString() 135 { 136 return "[JDBCAutomaticQueryMetaData : method=" + method + "]"; 137 } 138 } 139 | Popular Tags |