17 */ |
17 */ |
18 package info.globalcode.sql.dk; |
18 package info.globalcode.sql.dk; |
19 |
19 |
20 import java.sql.Connection; |
20 import java.sql.Connection; |
21 import java.sql.PreparedStatement; |
21 import java.sql.PreparedStatement; |
|
22 import java.sql.SQLException; |
|
23 import java.util.List; |
22 |
24 |
23 /** |
25 /** |
24 * |
26 * |
25 * @author Ing. František Kučera (frantovo.cz) |
27 * @author Ing. František Kučera (frantovo.cz) |
26 */ |
28 */ |
27 public class SQLCommandNamed extends SQLCommand { |
29 public class SQLCommandNamed extends SQLCommand { |
28 |
30 |
|
31 private List<NamedParameter> parameters; |
|
32 |
|
33 public SQLCommandNamed(COMMAND_TYPE commandType, String query, List<NamedParameter> parameters) { |
|
34 super(commandType, query); |
|
35 this.parameters = parameters; |
|
36 } |
|
37 |
29 @Override |
38 @Override |
30 public PreparedStatement prepareStatement(Connection c) { |
39 public PreparedStatement prepareStatement(Connection c) throws SQLException { |
31 throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. |
40 throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. |
32 } |
41 } |
33 |
42 |
34 @Override |
43 @Override |
35 public void parametrize(PreparedStatement ps) { |
44 public void parametrize(PreparedStatement ps) throws SQLException { |
36 throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. |
45 throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. |
37 } |
46 } |
|
47 |
|
48 @Override |
|
49 public List<NamedParameter> getParameters() { |
|
50 return parameters; |
|
51 } |
38 } |
52 } |