public function applyToQueryBuilder(QueryBuilder $qb, &$parameterOffset = 0)
	{
		$orderRules = $this->orderRules;
		foreach ($orderRules as $orderRule) {
			$field = $orderRule[self::FIELD_POS];
			switch ($field) {
				case self::LEFT_FIELD:
				case self::RIGHT_FIELD:
				case self::LEVEL_FIELD:
					break;
				default:
					throw new Exception\InvalidArgument("Field $field is not recognized");
			}

			$field = "e.$field";
			$directionSQL = null;;

			$direction = $orderRule[self::DIRECTION_POS];
			switch ($direction) {
				case self::DIRECTION_ASCENDING:
					$directionSQL = 'ASC';
					break;
				case self::DIRECTION_DESCENDING:
					$directionSQL = 'DESC';
					break;
				default:
					throw new Exception\InvalidArgument("Direction $direction is not recognized");
			}
			$qb->addOrderBy($field, $directionSQL);
		}
	}