CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_13_patch3/src/OnlineDB/EcalCondDB/src/LMFPrimVers.cc

Go to the documentation of this file.
00001 #include "OnlineDB/EcalCondDB/interface/LMFPrimVers.h"
00002 
00003 using namespace std;
00004 using namespace oracle::occi;
00005 
00006 LMFPrimVers::LMFPrimVers()
00007 {
00008   setClassName("LMFPrimVers");
00009   setString("description", "");
00010 }
00011 
00012 LMFPrimVers::LMFPrimVers(EcalDBConnection *c) : LMFUnique(c) {
00013   setClassName("LMFPrimVers");
00014   setString("description", "");
00015 }
00016 
00017 LMFPrimVers::LMFPrimVers(oracle::occi::Environment* env,
00018            oracle::occi::Connection* conn) : LMFUnique(env, conn) {
00019   setClassName("LMFPrimVers");
00020   setString("description", "");
00021 }
00022 
00023 LMFPrimVers::~LMFPrimVers()
00024 {
00025 }
00026 
00027 std::string LMFPrimVers::fetchIdSql(Statement *stmt) {
00028   return "";
00029 }
00030 
00031 std::string LMFPrimVers::setByIDSql(Statement *stmt, int id) 
00032 {
00033   std::string sql = "SELECT DESCR FROM CMS_ECAL_LASER_COND.LMF_PRIM_VERS "
00034     "WHERE VERS = :1";
00035   stmt->setSQL(sql);
00036   stmt->setInt(1, id);
00037   return sql;
00038 }
00039 
00040 void LMFPrimVers::getParameters(ResultSet *rset) {
00041   setString("description", rset->getString(1));
00042 }
00043 
00044 LMFUnique * LMFPrimVers::createObject() const {
00045   LMFPrimVers *t = new LMFPrimVers;
00046   t->setConnection(m_env, m_conn);
00047   return t;
00048 }
00049 
00050 std::string LMFPrimVers::fetchAllSql(Statement *stmt) const {
00051   std::string sql = "SELECT VERS FROM CMS_ECAL_LASER_COND.LMF_PRIM_VERS";
00052   stmt->setSQL(sql);
00053   return sql;
00054 }
00055