void NsAdapterCatalog::updateGroup(const GroupInfo& group) throw (DmException) { // gid may not be initialized GroupInfo g = this->getGroup(group.name); wrapCall(dpns_modifygrpmap(g.getUnsigned("gid"), (char*)group.name.c_str(), group.getLong("banned"))); }
void AuthnOracle::updateGroup(const GroupInfo& group) throw (DmException) { occi::Statement* stmt = getPreparedStatement(this->conn_, STMT_UPDATE_GROUP); try { stmt->setInt(1, group.getLong("banned")); stmt->setString(2, group.name); stmt->executeUpdate(); this->conn_->commit(); this->conn_->terminateStatement(stmt); } catch (occi::SQLException& ex) { this->conn_->rollback(); throw DmException(DM_INTERNAL_ERROR, ex.getMessage()); } }