CMS 3D CMS Logo

LMFTrigType.h
Go to the documentation of this file.
1 #ifndef LMFTRIGTYPE_H
2 #define LMFTRIGTYPE_H
3 
4 /*
5  Last updated by Giovanni.Organtini@roma1.infn.it 2010
6  */
7 
9 
10 class LMFTrigType : public LMFUnique {
11  public:
12  friend class EcalCondDBInterface;
13 
14  LMFTrigType();
16  LMFTrigType(oracle::occi::Environment* env,
17  oracle::occi::Connection* conn);
18  ~LMFTrigType() override;
19 
20  std::string getShortName() { return getString("short_name"); }
21  std::string getLongName() { return getString("long_name"); }
22  std::string getShortName() const { return getString("short_name"); }
23  std::string getLongName() const { return getString("long_name"); }
24 
27  setString("short_name", s);
28  setString("long_name", l);
29  return *this;
30  }
31 
32  // Operators
33  inline bool operator==(const LMFTrigType &m) const
34  {
35  return ((getShortName() == m.getShortName()) &&
36  (getLongName() == m.getLongName()));
37  }
38 
39  inline bool operator!=(const LMFTrigType &m) const { return !(*this == m); }
40 
41  private:
42  // Methods from LMFUnique
44  std::string fetchAllSql(Statement *stmt) const override;
45  std::string setByIDSql(Statement *stmt, int id) override;
46  void getParameters(ResultSet *rset) override;
47  LMFTrigType * createObject() const override;
48 };
49 
50 #endif
LMFTrigType & setNames(const std::string &s, const std::string &l)
Definition: LMFTrigType.h:26
bool operator!=(const LMFTrigType &m) const
Definition: LMFTrigType.h:39
std::string fetchAllSql(Statement *stmt) const override
Definition: LMFTrigType.cc:69
std::string getShortName() const
Definition: LMFTrigType.h:22
oracle::occi::ResultSet ResultSet
Definition: LMFUnique.h:19
std::string setByIDSql(Statement *stmt, int id) override
Definition: LMFTrigType.cc:48
oracle::occi::Connection * conn
oracle::occi::Statement Statement
Definition: LMFUnique.h:20
LMFTrigType * createObject() const override
Definition: LMFTrigType.cc:63
LMFUnique & setString(std::string key, std::string value)
Definition: LMFUnique.cc:15
LMFTrigType & setName(std::string s)
Definition: LMFTrigType.cc:31
std::string fetchIdSql(Statement *stmt) override
Definition: LMFTrigType.cc:37
std::string getLongName()
Definition: LMFTrigType.h:21
~LMFTrigType() override
Definition: LMFTrigType.cc:27
void getParameters(ResultSet *rset) override
Definition: LMFTrigType.cc:58
oracle::occi::Statement * stmt
std::string getString(std::string fieldname) const
Definition: LMFUnique.cc:194
bool operator==(const LMFTrigType &m) const
Definition: LMFTrigType.h:33
std::string getShortName()
Definition: LMFTrigType.h:20
std::string getLongName() const
Definition: LMFTrigType.h:23