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