CMS 3D CMS Logo

DateHandler.h
Go to the documentation of this file.
1 #ifndef DATEHANDLER_H
2 #define DATEHANDLER_H
3 
6 
7 class DateHandler {
8 public:
9  DateHandler(oracle::occi::Environment* env, oracle::occi::Connection* conn);
10  ~DateHandler();
11 
12  inline Tm getNegInfTm() const { return NEG_INF; }
13  inline Tm getPlusInfTm() const { return PLUS_INF; }
14  inline oracle::occi::Date getNegInfDate() const { return NEG_INF_DATE; }
15  inline oracle::occi::Date getPlusInfDate() const { return PLUS_INF_DATE; }
16 
20  inline oracle::occi::Date getCurrentDate() { return oracle::occi::Date(oracle::occi::Date::getSystemDate(m_env)); }
21 
25  inline oracle::occi::Date minDate() { return oracle::occi::Date(m_env, 1970, 1, 1, 0, 0, 0); }
26 
30  inline oracle::occi::Date maxDate() { return oracle::occi::Date(m_env, 9999, 12, 31, 23, 59, 59); }
31 
35  oracle::occi::Date tmToDate(const Tm& inTm) const;
36 
40  Tm dateToTm(oracle::occi::Date& date) const;
41 
42 private:
43  DateHandler() = delete; // hide the default constructor
44  oracle::occi::Connection* m_conn;
45  oracle::occi::Environment* m_env;
46 
49  oracle::occi::Date PLUS_INF_DATE;
50  oracle::occi::Date NEG_INF_DATE;
51 };
52 
53 #endif
DateHandler::PLUS_INF
Tm PLUS_INF
Definition: DateHandler.h:47
DateHandler::minDate
oracle::occi::Date minDate()
Definition: DateHandler.h:25
DateHandler::tmToDate
oracle::occi::Date tmToDate(const Tm &inTm) const
Definition: DateHandler.cc:19
DateHandler::maxDate
oracle::occi::Date maxDate()
Definition: DateHandler.h:30
SiStripCommissioningClient_cfg.conn
conn
Definition: SiStripCommissioningClient_cfg.py:5
DateHandler::getNegInfTm
Tm getNegInfTm() const
Definition: DateHandler.h:12
DateHandler::getCurrentDate
oracle::occi::Date getCurrentDate()
Definition: DateHandler.h:20
DateHandler::NEG_INF_DATE
oracle::occi::Date NEG_INF_DATE
Definition: DateHandler.h:50
Tm
Definition: Tm.h:13
web.browse_db.env
env
Definition: browse_db.py:18
DateHandler::m_env
oracle::occi::Environment * m_env
Definition: DateHandler.h:45
DateHandler::DateHandler
DateHandler()=delete
DateHandler::getPlusInfDate
oracle::occi::Date getPlusInfDate() const
Definition: DateHandler.h:15
Tm.h
DateHandler::getNegInfDate
oracle::occi::Date getNegInfDate() const
Definition: DateHandler.h:14
DateHandler::NEG_INF
Tm NEG_INF
Definition: DateHandler.h:48
indexGen.date
date
Definition: indexGen.py:99
DateHandler::dateToTm
Tm dateToTm(oracle::occi::Date &date) const
Definition: DateHandler.cc:28
DateHandler::PLUS_INF_DATE
oracle::occi::Date PLUS_INF_DATE
Definition: DateHandler.h:49
DateHandler::~DateHandler
~DateHandler()
Definition: DateHandler.cc:17
Oracle.h
DateHandler::m_conn
oracle::occi::Connection * m_conn
Definition: DateHandler.h:44
DateHandler
Definition: DateHandler.h:7
DateHandler::getPlusInfTm
Tm getPlusInfTm() const
Definition: DateHandler.h:13