Class CalendarHelper
- java.lang.Object
 - 
- org.linuxforhealth.fhir.database.utils.common.CalendarHelper
 
 
- 
public class CalendarHelper extends java.lang.ObjectHelper 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 java.util.CalendargetCalendarForUTC()Get a thread-specific instance of a calendar configured for UTC.static java.sql.TimestampgetTimestampUTC(java.sql.ResultSet rs, int col)Helper to obtain a UTC timestamp from a JDBCResultSetstatic voidsetTimestampUTC(java.sql.PreparedStatement ps, int col, java.sql.Timestamp ts)Helper to set a UTC timestamp value in a JDBCPreparedStatementSupports null handling for ts. 
 - 
 
- 
- 
Method Detail
- 
getCalendarForUTC
public static java.util.Calendar getCalendarForUTC()
Get a thread-specific instance of a calendar configured for UTC.- Returns:
 
 
- 
getTimestampUTC
public static java.sql.Timestamp getTimestampUTC(java.sql.ResultSet rs, int col) throws java.sql.SQLExceptionHelper to obtain a UTC timestamp from a JDBCResultSet- Parameters:
 rs-col-- Returns:
 - Throws:
 java.sql.SQLException
 
- 
setTimestampUTC
public static void setTimestampUTC(java.sql.PreparedStatement ps, int col, java.sql.Timestamp ts) throws java.sql.SQLExceptionHelper to set a UTC timestamp value in a JDBCPreparedStatementSupports null handling for ts.- Parameters:
 ps-col-ts-- Throws:
 java.sql.SQLException
 
 - 
 
 -