/**
  * @see	\wcf\data\ISortableAction::updatePosition()
  */
 public function updatePosition()
 {
     // remove previous settings
     $conditions = new PreparedStatementConditionBuilder();
     $conditions->add("objectTypeID = ?", array($this->objectType->objectTypeID));
     if (!empty($this->boxes)) {
         $conditions->add("boxID IN (?)", array(array_keys($this->boxes)));
     }
     $sql = "DELETE FROM\twcf" . WCF_N . "_dashboard_option\n\t\t\t" . $conditions;
     $statement = WCF::getDB()->prepareStatement($sql);
     $statement->execute($conditions->getParameters());
     // update settings
     if (!empty($this->boxStructure)) {
         $sql = "INSERT INTO\twcf" . WCF_N . "_dashboard_option\n\t\t\t\t\t\t(objectTypeID, boxID, showOrder)\n\t\t\t\tVALUES\t\t(?, ?, ?)";
         $statement = WCF::getDB()->prepareStatement($sql);
         WCF::getDB()->beginTransaction();
         foreach ($this->boxStructure as $index => $boxID) {
             $showOrder = $index + 1;
             $statement->execute(array($this->objectType->objectTypeID, $boxID, $showOrder));
         }
         WCF::getDB()->commitTransaction();
     }
     // reset cache
     DashboardHandler::clearCache();
 }