/**
  * Adds limitations to an existing policy.
  *
  * @param int $policyId
  * @param array $limitations
  */
 public function addPolicyLimitations($policyId, array $limitations)
 {
     foreach ($limitations as $identifier => $values) {
         $query = $this->handler->createInsertQuery();
         $query->insertInto($this->handler->quoteTable('ezpolicy_limitation'))->set($this->handler->quoteColumn('id'), $this->handler->getAutoIncrementValue('ezpolicy_limitation', 'id'))->set($this->handler->quoteColumn('identifier'), $query->bindValue($identifier))->set($this->handler->quoteColumn('policy_id'), $query->bindValue($policyId, null, \PDO::PARAM_INT));
         $query->prepare()->execute();
         $limitationId = $this->handler->lastInsertId($this->handler->getSequenceName('ezpolicy_limitation', 'id'));
         foreach ($values as $value) {
             $query = $this->handler->createInsertQuery();
             $query->insertInto($this->handler->quoteTable('ezpolicy_limitation_value'))->set($this->handler->quoteColumn('id'), $this->handler->getAutoIncrementValue('ezpolicy_limitation_value', 'id'))->set($this->handler->quoteColumn('value'), $query->bindValue($value))->set($this->handler->quoteColumn('limitation_id'), $query->bindValue($limitationId, null, \PDO::PARAM_INT));
             $query->prepare()->execute();
         }
     }
 }