Clover coverage report - brownies library - 1.0-beta-1 Coverage timestamp: 月 8 16 2004 17:14:42 GMT+09:00 FRAMES NO FRAMES |
file stats: | LOC: | 122 |  | Methods: | 11
| NCLOC: | 58 |  | Classes: | 1
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover
Source file | Conditionals | Statements | Methods | TOTAL
SqlLoadableStatement.java | - | 0% | 0% | 0% |

1 |  |
     /*
2 |  |
      * Joey and its relative products are published under the terms
3 |  |
      * of the Apache Software License.
4 |  |
      */
5 |  |
     /*
6 |  |
      * Created on 2003/12/18
7 |  |
      */
8 |  |
     package org.asyrinx.brownie.jdbc;
9 |  |
10 |  |
     import java.io.IOException;
11 |  |
     import java.sql.ResultSet;
12 |  |
     import java.sql.SQLException;
13 |  |
     import java.sql.Statement;
14 |  |
15 |  |
     import org.asyrinx.brownie.core.io.sf.StreamFactory;
16 |  |
     import org.asyrinx.brownie.core.io.sf.StreamFactoryFacade;
17 |  |
     import org.asyrinx.brownie.core.io.sf.StringLoader;
18 |  |
     import org.asyrinx.brownie.jdbc.wrapper.StatementWrapper;
19 |  |
20 |  |
     /**
21 |  |
      * @author akima
22 |  |
      */
23 |  |
     public final class SqlLoadableStatement extends StatementWrapper {
24 |  |
25 |  |
         /**
26 |  |
          *
27 |  |
          * @param source
28 |  |
          */
29 | 0 |
         SqlLoadableStatement(Statement source, StreamFactoryFacade baseStreamFactory) {
30 | 0 |
             super(source);
31 | 0 |
             this.streamFactory = SqlLoadableConnection.newFactory(
32 |  |
                     SqlLoadableStatement.class.getName(), baseStreamFactory);
33 | 0 |
             this.loader = new StringLoader(streamFactory);
34 |  |
         }
35 |  |
36 |  |
         private final StreamFactory streamFactory;
37 |  |
38 |  |
         private final StringLoader loader;
39 |  |
40 | 0 |
         protected final String load(String key) throws SQLException {
41 | 0 |
             try {
42 | 0 |
                 return loader.load(key);
43 |  |
             } catch (IOException e) {
44 | 0 |
                 throw new SQLException(e.getMessage());
45 |  |
             }
46 |  |
         }
47 |  |
48 |  |
         /**
49 |  |
          * @see org.asyrinx.jdbc.wrapper.StatementWrapper#execute(java.lang.String)
50 |  |
          */
51 | 0 |
         public boolean executeFromFile(String sqlKey) throws SQLException {
52 | 0 |
             return super.execute(load(sqlKey));
53 |  |
         }
54 |  |
55 |  |
         /**
56 |  |
          * @see org.asyrinx.jdbc.wrapper.StatementWrapper#execute(java.lang.String,
57 |  |
          *      int)
58 |  |
          */
59 | 0 |
         public boolean executeFromFile(String sqlKey, int autoGeneratedKeys)
60 |  |
                 throws SQLException {
61 | 0 |
             return super.execute(load(sqlKey), autoGeneratedKeys);
62 |  |
         }
63 |  |
64 |  |
         /**
65 |  |
          * @see org.asyrinx.jdbc.wrapper.StatementWrapper#execute(java.lang.String,
66 |  |
          *      int[])
67 |  |
          */
68 | 0 |
         public boolean executeFromFile(String sqlKey, int[] columnIndexes)
69 |  |
                 throws SQLException {
70 | 0 |
             return super.execute(load(sqlKey), columnIndexes);
71 |  |
         }
72 |  |
73 |  |
         /**
74 |  |
          * @see org.asyrinx.jdbc.wrapper.StatementWrapper#execute(java.lang.String,
75 |  |
          *      java.lang.String[])
76 |  |
          */
77 | 0 |
         public boolean executeFromFile(String sqlKey, String[] columnNames)
78 |  |
                 throws SQLException {
79 | 0 |
             return super.execute(load(sqlKey), columnNames);
80 |  |
         }
81 |  |
82 |  |
         /**
83 |  |
          * @see org.asyrinx.jdbc.wrapper.StatementWrapper#executeQuery(java.lang.String)
84 |  |
          */
85 | 0 |
         public ResultSet executeQueryFromFile(String sqlKey) throws SQLException {
86 | 0 |
             return super.executeQuery(load(sqlKey));
87 |  |
         }
88 |  |
89 |  |
         /**
90 |  |
          * @see org.asyrinx.jdbc.wrapper.StatementWrapper#executeUpdate(java.lang.String)
91 |  |
          */
92 | 0 |
         public int executeUpdateFromFile(String sqlKey) throws SQLException {
93 | 0 |
             return super.executeUpdate(load(sqlKey));
94 |  |
         }
95 |  |
96 |  |
         /**
97 |  |
          * @see org.asyrinx.jdbc.wrapper.StatementWrapper#executeUpdate(java.lang.String,
98 |  |
          *      int)
99 |  |
          */
100 | 0 |
         public int executeUpdateFromFile(String sqlKey, int autoGeneratedKeys)
101 |  |
                 throws SQLException {
102 | 0 |
             return super.executeUpdate(load(sqlKey), autoGeneratedKeys);
103 |  |
         }
104 |  |
105 |  |
         /**
106 |  |
          * @see org.asyrinx.jdbc.wrapper.StatementWrapper#executeUpdate(java.lang.String,
107 |  |
          *      int[])
108 |  |
          */
109 | 0 |
         public int executeUpdateFromFile(String sqlKey, int[] columnIndexes)
110 |  |
                 throws SQLException {
111 | 0 |
             return super.executeUpdate(load(sqlKey), columnIndexes);
112 |  |
         }
113 |  |
114 |  |
         /**
115 |  |
          * @see org.asyrinx.jdbc.wrapper.StatementWrapper#executeUpdate(java.lang.String,
116 |  |
          *      java.lang.String[])
117 |  |
          */
118 | 0 |
         public int executeUpdateFromFile(String sqlKey, String[] columnNames)
119 |  |
                 throws SQLException {
120 | 0 |
             return super.executeUpdate(load(sqlKey), columnNames);
121 |  |
         }
122 |  |
     }