// @cmember Is it possible to write to this <c OMFile> ? // @rdesc True if this <c OMFile> is writable, false otherwise. // @this const bool OMFile::isWritable(void) const { TRACE("OMFile::isWritable"); bool result; if ((accessMode() == writeOnlyMode) || (accessMode() == modifyMode)) { result = true; } else { result = false; } return result; }
void TransMode::updateTransMode(TransMode * trans_mode) { if (trans_mode->isolationLevel() != TransMode::IL_NOT_SPECIFIED_) isolationLevel() = trans_mode->isolationLevel(); if (trans_mode->accessMode() != TransMode::AM_NOT_SPECIFIED_) accessMode() = trans_mode->accessMode(); if (trans_mode->autoCommit() != TransMode::AC_NOT_SPECIFIED_) autoCommit() = trans_mode->autoCommit(); if (trans_mode->rollbackMode() != TransMode::ROLLBACK_MODE_NOT_SPECIFIED_) rollbackMode() = trans_mode->rollbackMode(); if (trans_mode->diagAreaSize() >= 0) diagAreaSize() = trans_mode->diagAreaSize(); if (trans_mode->autoAbortIntervalInSeconds() >= -3) autoAbortIntervalInSeconds() = trans_mode->getAutoAbortIntervalInSeconds(); if (trans_mode->multiCommit() != multiCommit()) { multiCommit() = trans_mode->multiCommit(); multiCommitSize() = trans_mode->getMultiCommitSize(); } // sets either one of these flag bits to on to indicate whether auto begin // is turned on or off. Only sets it if the user explicitly issues an // on or off setting eg. (set transaction autobegin on|off). if (trans_mode->getAutoBeginOn() != 0) // 0 means it has not been set for // changing by the user. { setAutoBeginOff(FALSE); // to clear AUTO_BEGIN_OFF_ bit setAutoBeginOn(trans_mode->getAutoBeginOn()); } else if (trans_mode->getAutoBeginOff() != 0) { setAutoBeginOn(FALSE); // to clear AUTO_BEGIN_ON_ bit setAutoBeginOff(trans_mode->getAutoBeginOff()); } }