Public Member Functions | Private Attributes

dbo_MedVolStatusSet Class Reference

#include <rm_dboperation.h>

Inheritance diagram for dbo_MedVolStatusSet:
Inheritance graph
[legend]
Collaboration diagram for dbo_MedVolStatusSet:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 dbo_MedVolStatusSet (string a_medVoId, UInt32_t a_status, rm_DBThread &a_DBThread)
virtual void Process ()

Private Attributes

string m_medVolId
UInt32_t m_status
 log_CLASSID_m

Detailed Description

Definition at line 1206 of file rm_dboperation.h.


Constructor & Destructor Documentation

dbo_MedVolStatusSet::dbo_MedVolStatusSet ( string  a_medVoId,
UInt32_t  a_status,
rm_DBThread a_DBThread 
)

Definition at line 1245 of file rm_dboperation.cpp.

                                                                   : 

                rm_DBOperation(a_DBThread),
                m_medVolId(a_medVolId),
                m_status(a_status) {
    /*empty*/
}


Member Function Documentation

void dbo_MedVolStatusSet::Process (  )  [virtual]

Implements rm_DBOperation.

Definition at line 1255 of file rm_dboperation.cpp.

References ie_PRECONDITION, ivd_Error, log_WriteEvent(), rm_DBOperation::m_DBThread, m_medVolId, rm_DBThread::m_rmOp, m_status, i_MediumVol_t::medVolId, rm_Operator::SelectMediumVol(), i_MediumVol_t::status, str, and rm_Operator::Update().

                                  {
    i_MediumVol_t mv = m_DBThread.m_rmOp.SelectMediumVol(m_medVolId);
   
    if (mv.status & m_status) {
        ostringstream str;
        str << "Volume " << mv.medVolId <<" has already status " << hex <<
               mv.status << " set.";
        // medium status already set
        // fail status set
        throw ivd_Error(ie_PRECONDITION, str.str());
    }
    log_WriteEvent("MediumVol status set ", "", 0, string(mv.medVolId));
    mv.status = mv.status | m_status;
    m_DBThread.m_rmOp.Update(mv);
}

Here is the call graph for this function:


Member Data Documentation

Reimplemented from rm_DBOperation.

Definition at line 1216 of file rm_dboperation.h.

Definition at line 1214 of file rm_dboperation.h.

Referenced by Process().

Definition at line 1215 of file rm_dboperation.h.

Referenced by Process().


The documentation for this class was generated from the following files: