예제 #1
0
파일: NsAdapter.cpp 프로젝트: ic-hep/emi3
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")));
}
예제 #2
0
파일: AuthnOracle.cpp 프로젝트: ic-hep/emi3
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());
  }
}