1 package org.kuali.coeus.dc.common.db;
2
3
4 import java.sql.PreparedStatement;
5 import java.sql.SQLException;
6 import java.sql.Timestamp;
7
8 public final class PreparedStatementUtils {
9
10 private PreparedStatementUtils() {
11 throw new UnsupportedOperationException("do not call");
12 }
13
14 public static PreparedStatement setString(int index, String string, PreparedStatement stmt) throws SQLException {
15 stmt.setString(index, string);
16 return stmt;
17 }
18
19 public static PreparedStatement setLong(int index, Long l, PreparedStatement stmt) throws SQLException {
20 stmt.setLong(index, l);
21 return stmt;
22 }
23
24 public static PreparedStatement setTimestamp(int index, Timestamp t, PreparedStatement stmt) throws SQLException {
25 stmt.setTimestamp(index, t);
26 return stmt;
27 }
28 }