Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:22:54

0001 #ifndef LMFTRIGTYPE_H
0002 #define LMFTRIGTYPE_H
0003 
0004 /*
0005  Last updated by  Giovanni.Organtini@roma1.infn.it 2010
0006  */
0007 
0008 #include "OnlineDB/EcalCondDB/interface/LMFUnique.h"
0009 
0010 class LMFTrigType : public LMFUnique {
0011 public:
0012   friend class EcalCondDBInterface;
0013 
0014   LMFTrigType();
0015   LMFTrigType(EcalDBConnection *c);
0016   LMFTrigType(oracle::occi::Environment *env, oracle::occi::Connection *conn);
0017   ~LMFTrigType() override;
0018 
0019   std::string getShortName() { return getString("short_name"); }
0020   std::string getLongName() { return getString("long_name"); }
0021   std::string getShortName() const { return getString("short_name"); }
0022   std::string getLongName() const { return getString("long_name"); }
0023 
0024   LMFTrigType &setName(std::string s);
0025   LMFTrigType &setNames(const std::string &s, const std::string &l) {
0026     setString("short_name", s);
0027     setString("long_name", l);
0028     return *this;
0029   }
0030 
0031   // Operators
0032   inline bool operator==(const LMFTrigType &m) const {
0033     return ((getShortName() == m.getShortName()) && (getLongName() == m.getLongName()));
0034   }
0035 
0036   inline bool operator!=(const LMFTrigType &m) const { return !(*this == m); }
0037 
0038 private:
0039   // Methods from LMFUnique
0040   std::string fetchIdSql(Statement *stmt) override;
0041   std::string fetchAllSql(Statement *stmt) const override;
0042   std::string setByIDSql(Statement *stmt, int id) override;
0043   void getParameters(ResultSet *rset) override;
0044   LMFTrigType *createObject() const override;
0045 };
0046 
0047 #endif