1 package uk.ac.ebi.intenz.mapper;
2
3 import java.sql.CallableStatement;
4 import java.sql.Connection;
5 import java.sql.SQLException;
6 import java.sql.Types;
7
8
9
10
11
12
13
14 public class AuditPackageMapper {
15
16 public static final String STANDARD_REMARK = "Update by web application.";
17
18 public AuditPackageMapper() {
19 }
20
21 private String callStatement() {
22 return "{CALL enzyme.auditpackage.setremark(?)}";
23 }
24
25
26
27
28
29
30
31
32 public void setRemark(String remark, Connection con) throws SQLException {
33 CallableStatement cStmt = null;
34
35 try {
36 cStmt = con.prepareCall(callStatement());
37 if (remark == null){
38 cStmt.setNull(1, Types.VARCHAR);
39 } else {
40 cStmt.setString(1, remark);
41 }
42 cStmt.executeUpdate();
43 } finally {
44 cStmt.close();
45 }
46 }
47
48 }