File indexing completed on 2024-04-06 12:22:54
0001 #ifndef LMFPRIMVERS_H
0002 #define LMFPRIMVERS_H
0003
0004 #include <string>
0005 #include <stdexcept>
0006
0007
0008
0009
0010
0011 #include "OnlineDB/EcalCondDB/interface/LMFUnique.h"
0012 #include "OnlineDB/EcalCondDB/interface/EcalDBConnection.h"
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022 class LMFPrimVers : public LMFUnique {
0023 public:
0024 friend class LMFRunIOV;
0025
0026 LMFPrimVers();
0027 LMFPrimVers(EcalDBConnection *c);
0028 LMFPrimVers(oracle::occi::Environment *env, oracle::occi::Connection *conn);
0029 ~LMFPrimVers() override;
0030
0031
0032 int getVersion() const { return m_ID; }
0033 std::string getDescription() const { return getString("description"); }
0034 void setVersion(int v) { m_ID = v; }
0035 void setDescription(const std::string &s) { setString("description", s); }
0036
0037
0038 inline bool operator==(const LMFPrimVers &t) const { return (getID() == t.getID()); }
0039 inline bool operator!=(const LMFPrimVers &t) const { return (getID() != t.getID()); }
0040
0041 private:
0042
0043 std::string fetchIdSql(Statement *stmt) override;
0044 std::string fetchAllSql(Statement *stmt) const override;
0045 std::string setByIDSql(Statement *stmt, int id) override;
0046 void getParameters(ResultSet *rset) override;
0047 LMFUnique *createObject() const override;
0048 };
0049
0050 #endif