Class CalendarHelper
- java.lang.Object
-
- com.ibm.fhir.persistence.jdbc.util.CalendarHelper
-
public class CalendarHelper extends Object
Helper for time and calendar-related functions related to JDBC statements and results
-
-
Constructor Summary
Constructors Constructor Description CalendarHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Calendar
getCalendarForUTC()
Get a thread-specific instance of a calendar configured for UTC.static Timestamp
getTimestampUTC(ResultSet rs, int col)
Helper to obtain a UTC timestamp from a JDBCResultSet
static void
setTimestampUTC(PreparedStatement ps, int col, Timestamp ts)
Helper to set a UTC timestamp value in a JDBCPreparedStatement
Supports null handling for ts.
-
-
-
Method Detail
-
getCalendarForUTC
public static Calendar getCalendarForUTC()
Get a thread-specific instance of a calendar configured for UTC.- Returns:
-
getTimestampUTC
public static Timestamp getTimestampUTC(ResultSet rs, int col) throws SQLException
Helper to obtain a UTC timestamp from a JDBCResultSet
- Parameters:
rs
-col
-- Returns:
- Throws:
SQLException
-
setTimestampUTC
public static void setTimestampUTC(PreparedStatement ps, int col, Timestamp ts) throws SQLException
Helper to set a UTC timestamp value in a JDBCPreparedStatement
Supports null handling for ts.- Parameters:
ps
-col
-ts
-- Throws:
SQLException
-
-