1 22 package org.jboss.ejb.plugins.cmp.jdbc.metadata; 23 24 import java.lang.reflect.Method ; 25 26 33 public final class JDBCRawSqlQueryMetaData implements JDBCQueryMetaData 34 { 35 private final Method method; 36 37 private final Class compiler; 38 39 private final boolean lazyResultSetLoading; 40 41 47 public JDBCRawSqlQueryMetaData(Method method, Class qlCompiler, boolean lazyResultSetLoading) 48 { 49 this.method = method; 50 this.compiler = qlCompiler; 51 this.lazyResultSetLoading = lazyResultSetLoading; 52 } 53 54 public Method getMethod() 55 { 56 return method; 57 } 58 59 public boolean isResultTypeMappingLocal() 60 { 61 return false; 62 } 63 64 public Class getQLCompilerClass() 65 { 66 return compiler; 67 } 68 69 74 public JDBCReadAheadMetaData getReadAhead() 75 { 76 return JDBCReadAheadMetaData.DEFAULT; 77 } 78 79 public boolean isLazyResultSetLoading() 80 { 81 return lazyResultSetLoading; 82 } 83 84 92 public boolean equals(Object o) 93 { 94 if(o instanceof JDBCRawSqlQueryMetaData) 95 { 96 return ((JDBCRawSqlQueryMetaData) o).method.equals(method); 97 } 98 return false; 99 } 100 101 107 public int hashCode() 108 { 109 return method.hashCode(); 110 } 111 112 121 public String toString() 122 { 123 return "[JDBCRawSqlQueryMetaData : method=" + method + "]"; 124 } 125 } 126 | Popular Tags |