KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hammurapi > inspectors > metrics > SqlExtractorHyperSonicDb


1 /*
2  * Created on Oct 16, 2004
3  *
4  * TODO To change the template for this generated file go to
5  * Window - Preferences - Java - Code Style - Code Templates
6  */

7 package org.hammurapi.inspectors.metrics;
8
9 import java.sql.SQLException JavaDoc;
10
11 import org.hammurapi.HammurapiException;
12 import org.hammurapi.InspectorContext;
13
14 import com.pavelvlasov.persistence.CompositeStorage;
15 import com.pavelvlasov.review.SourceMarker;
16 import com.pavelvlasov.sql.JdbcStorage;
17 import com.pavelvlasov.sql.SQLProcessor;
18
19 /**
20  * @author 111001082
21  *
22  * TODO To change the template for this generated type comment go to
23  * Window - Preferences - Java - Code Style - Code Templates
24  */

25 public class SqlExtractorHyperSonicDb {
26
27     public InspectorContext context = null;
28     
29
30
31     protected SQLProcessor getProcessor(SourceMarker marker) {
32         JdbcStorage jdbcStorage = (JdbcStorage) ((CompositeStorage) context.getSession().getStorage()).getStorage(JdbcStorage.class);
33         if (jdbcStorage==null) {
34             context.warn(marker, "Could not obtain JdbcStorage");
35             return null;
36         } else {
37             return jdbcStorage.getProcessor();
38         }
39     }
40
41 }
42
Popular Tags