File indexing completed on 2024-04-06 12:23:05
0001 #include "OnlineDB/EcalCondDB/interface/LMFPrimVers.h"
0002
0003 using namespace std;
0004 using namespace oracle::occi;
0005
0006 LMFPrimVers::LMFPrimVers() {
0007 setClassName("LMFPrimVers");
0008 setString("description", "");
0009 }
0010
0011 LMFPrimVers::LMFPrimVers(EcalDBConnection *c) : LMFUnique(c) {
0012 setClassName("LMFPrimVers");
0013 setString("description", "");
0014 }
0015
0016 LMFPrimVers::LMFPrimVers(oracle::occi::Environment *env, oracle::occi::Connection *conn) : LMFUnique(env, conn) {
0017 setClassName("LMFPrimVers");
0018 setString("description", "");
0019 }
0020
0021 LMFPrimVers::~LMFPrimVers() {}
0022
0023 std::string LMFPrimVers::fetchIdSql(Statement *stmt) { return ""; }
0024
0025 std::string LMFPrimVers::setByIDSql(Statement *stmt, int id) {
0026 std::string sql =
0027 "SELECT DESCR FROM CMS_ECAL_LASER_COND.LMF_PRIM_VERS "
0028 "WHERE VERS = :1";
0029 stmt->setSQL(sql);
0030 stmt->setInt(1, id);
0031 return sql;
0032 }
0033
0034 void LMFPrimVers::getParameters(ResultSet *rset) { setString("description", rset->getString(1)); }
0035
0036 LMFUnique *LMFPrimVers::createObject() const {
0037 LMFPrimVers *t = new LMFPrimVers;
0038 t->setConnection(m_env, m_conn);
0039 return t;
0040 }
0041
0042 std::string LMFPrimVers::fetchAllSql(Statement *stmt) const {
0043 std::string sql = "SELECT VERS FROM CMS_ECAL_LASER_COND.LMF_PRIM_VERS";
0044 stmt->setSQL(sql);
0045 return sql;
0046 }