equal
deleted
inserted
replaced
24 * |
24 * |
25 * @author Ing. František Kučera (frantovo.cz) |
25 * @author Ing. František Kučera (frantovo.cz) |
26 */ |
26 */ |
27 public abstract class SQLCommand { |
27 public abstract class SQLCommand { |
28 |
28 |
|
29 private COMMAND_TYPE commandType; |
29 private String query; |
30 private String query; |
30 |
31 |
31 public abstract PreparedStatement prepareStatement(Connection c); |
32 public abstract PreparedStatement prepareStatement(Connection c); |
32 |
33 |
33 public abstract void parametrize(PreparedStatement ps); |
34 public abstract void parametrize(PreparedStatement ps); |
|
35 |
|
36 public COMMAND_TYPE getCommandType() { |
|
37 return commandType; |
|
38 } |
|
39 |
|
40 public void setCommandType(COMMAND_TYPE commandType) { |
|
41 this.commandType = commandType; |
|
42 } |
|
43 |
|
44 public String getQuery() { |
|
45 return query; |
|
46 } |
|
47 |
|
48 public enum COMMAND_TYPE { |
|
49 |
|
50 /** SELECT */ |
|
51 QUERY, |
|
52 /** INSERT, UPDATE, DELETE */ |
|
53 UPDATE |
|
54 }; |
34 } |
55 } |