protected function setOIDInternal(ObjectId $oid, $triggerListeners) {
    $this->type = $oid->getType();
    $this->oid = $oid;
    // update the primary key attributes
    $ids = $oid->getId();
    $pkNames = $this->getMapper()->getPkNames();
    for ($i=0, $count=sizeof($pkNames); $i<$count; $i++) {
      if ($triggerListeners) {
        $this->setValue($pkNames[$i], $ids[$i], true);
      }
      else {
        $this->setValueInternal($pkNames[$i], $ids[$i]);
      }
    }
  }