#ifndef DBIROLLBACKDATES_H #define DBIROLLBACKDATES_H /** * * $Id: IDbiRollbackDates.hxx,v 1.1 2011/01/18 05:49:20 finch Exp $ * * \class COMET::IDbiRollbackDates * * * \brief * Concept A register of rollback dates organised by table name * * \brief * Purpose Simplify rollback date management by extracting info. * from DBI registry and serving by table name * * Contact: A.Finch@lancaster.ac.uk * * */ #include #include #ifndef ROOT_Rtypes #if !defined(__CINT__) || defined(__MAKECINT__) #include "Rtypes.h" #endif #endif namespace COMET{ class IDbiRegistry; } namespace COMET { class IDbiRollbackDates { public: typedef std::map name_map_t; // Constructors and destructors. IDbiRollbackDates(); virtual ~IDbiRollbackDates(); // State testing member functions const std::string& GetDate(const std::string& tableName) const; const std::string& GetType(const std::string& tableName) const; void Show() const; // State changing member functions void Clear() {fTableToDate.clear(); fTableToType.clear();} void Set(IDbiRegistry& reg); //Modifies IDbiRegistry private: // Data members /// Look-up table name -> date string name_map_t fTableToDate; /// Look-up table name -> time type (either "INSERTDATE" [default] or "CREATIONDATE") name_map_t fTableToType; ClassDef(IDbiRollbackDates,0) // Rollback dates by table name. }; }; #endif // DBIROLLBACKDATES_H