public function swap($locationId1, $locationId2)
{
$query = $this->handler->createSelectQuery();
$query->select($this->handler->quoteColumn('node_id'), $this->handler->quoteColumn('contentobject_id'), $this->handler->quoteColumn('contentobject_version'))->from($this->handler->quoteTable('ezcontentobject_tree'))->where($query->expr->in($this->handler->quoteColumn('node_id'), array($locationId1, $locationId2)));
$statement = $query->prepare();
$statement->execute();
foreach ($statement->fetchAll() as $row) {
$contentObjects[$row['node_id']] = $row;
}
$query = $this->handler->createUpdateQuery();
$query->update($this->handler->quoteTable('ezcontentobject_tree'))->set($this->handler->quoteColumn('contentobject_id'), $query->bindValue($contentObjects[$locationId2]['contentobject_id']))->set($this->handler->quoteColumn('contentobject_version'), $query->bindValue($contentObjects[$locationId2]['contentobject_version']))->where($query->expr->eq($this->handler->quoteColumn('node_id'), $query->bindValue($locationId1)));
$query->prepare()->execute();
$query = $this->handler->createUpdateQuery();
$query->update($this->handler->quoteTable('ezcontentobject_tree'))->set($this->handler->quoteColumn('contentobject_id'), $query->bindValue($contentObjects[$locationId1]['contentobject_id']))->set($this->handler->quoteColumn('contentobject_version'), $query->bindValue($contentObjects[$locationId1]['contentobject_version']))->where($query->expr->eq($this->handler->quoteColumn('node_id'), $query->bindValue($locationId2)));
$query->prepare()->execute();
}