Marks a hydration as stopped. Number of hydrated entities and alias map is
passed to method.

@param int   $resultNum
@param array $aliasMap
9559
public function stop($resultNum, $aliasMap)
    {
        if ($this->enabled) {
            $this->hydrations[$this->currentHydration]['executionMS'] = microtime(true) - $this->start;
            $this->hydrations[$this->currentHydration]['resultNum'] = $resultNum;
            $this->hydrations[$this->currentHydration]['aliasMap'] = $aliasMap;
        }
    }
810960
public void removeAlias(String cacheName, Object alias) {
        if (alias != null) {
            DCache cache = ServerCache.getCache(cacheName);
            if (cache != null) {
                try {
                    cache.removeAlias(alias, false, false);
                } catch (IllegalArgumentException e) {
                    if (tc.isDebugEnabled()) {
                        Tr.debug(tc, "Removing alias " + alias + " failure: " + e.getMessage());
                    }
                }
            }
        }
    }
690288
private function endQuery(SelectInterface $query, $count) {
    $result = $query
      ->range(0, $count)
      ->execute()
      ->fetchCol();

    return !empty($result) ? $result : [];
  }
458232
private function cacheSet($alias, $collection, $result)
    {
        if (!$this->cacheEnabled) {
            return null;
        }

        $hash = spl_object_hash($collection);
        if (!isset($this->cache[$hash])) {
            $this->cache[$hash] = []; // initialize the collection's cache
        }
        $this->cache[$hash][$alias] = $result;
    }
634423
public function stop(Drive_Channel $postBody, $optParams = array())
  {
    $params = array('postBody' => $postBody);
    $params = array_merge($params, $optParams);
    return $this->call('stop', array($params));
  }
1234892
protected function renderDataTableMap(DataTable\Map $map, $prefix)
    {
        $output = "Set<hr />";
        $prefix = $prefix . '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
        foreach ($map->getDataTables() as $descTable => $table) {
            $output .= $prefix . "<b>" . $descTable . "</b><br />";
            $output .= $prefix . $this->renderTable($table, $prefix . '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;');
            $output .= "<hr />";
        }
        return $output;
    }
1342051
public function mpsRedirect($data = [], $resultIsUrl = FALSE)
    {
        try {
            $this->debug->info(__FUNCTION__, 'Input Params: ' . json_encode($data));
            $movitelMps = new MovitelMps\MovitelMps($this->options);
            $movitelMps->setMovitelPublicKey($this->movitelPublicKey);
            $movitelMps->setMovitelPrivateKey($this->movitelPrivateKey);
            $movitelMps->setCpPublicKey($this->cpPublicKey);
            $movitelMps->setCpPrivateKey($this->cpPrivateKey);
            $dataToRequest = "SUB=" . $data['sub'] . "&REQ=" . $data['req'] . "&SOURCE=" . $data['source'] . "&SESS=" . $data['session_id'];
            $dataLink      = "PRO=" . $data['provider'] . "&CMD=" . $data['cmd_msisdn'] . "&SER=" . $data['service'] . "&SUB=" . $data['sub'] . "&DATA=";
            $this->debug->info(__FUNCTION__, '$dataToRequest: ' . json_encode($dataToRequest));
            $this->debug->info(__FUNCTION__, '$dataLink: ' . json_encode($dataLink));
            $dataRequest = $movitelMps->createDataRequestToMps($data, $dataToRequest);
            $this->debug->info(__FUNCTION__, '$dataRequest: ' . json_encode($dataRequest));
            if ($dataRequest !== NULL && is_array($dataRequest)) {
                $dataEncrypted = $dataRequest[0];
                $dataSignature = $dataRequest[1];
                // Link
                $movitelRedirectUrl = $data['link'] . self::MSISDN_METHOD . '?' . $dataLink . urlencode($dataEncrypted) . '&SIG=' . $dataSignature;
                $this->debug->info(__FUNCTION__, '$movitelRedirectUrl: ' . json_encode($movitelRedirectUrl));
                if ($resultIsUrl === TRUE) {
                    $this->debug->info(__FUNCTION__, 'Result is URL');

                    return [
                        'status' => 'url',
                        'link'   => $movitelRedirectUrl
                    ];
                } else {
                    $this->debug->info(__FUNCTION__, 'Result is Redirect');
                    // Redirect url
                    Utils::redirect($movitelRedirectUrl);
                }
            }
            $this->debug->info(__FUNCTION__, 'Invalid Redirect URL');
        }
        catch (\Exception $e) {
            $message = 'Error File: ' . $e->getFile() . ' - Line: ' . $e->getLine() . ' - Code: ' . $e->getCode() . ' - Message: ' . $e->getMessage();
            $this->debug->error(__FUNCTION__, $message);

            return NULL;
        }

        return NULL;
    }
893443
public function hydrate($incoming, $model, Map $context = null)
    {
        $callable = $this->getDelegateHydrator();

        if (null === $context && $this->provide_fallback_context) {
            // Provide a non-null context so null checks aren't later required
            $context = new Map();
        }

        return $callable($incoming, $model, $context);
    }
144322
public function stop(Google_Channel $postBody, $optParams = array()) {
      $params = array('postBody' => $postBody);
      $params = array_merge($params, $optParams);
      $data = $this->__call('stop', array($params));
      return $data;
    }
391174
public function eachById(callable $callback, $count = 1000, $column = null, $alias = null)
    {
        return $this->chunkById($count, function ($results) use ($callback) {
            foreach ($results as $key => $value) {
                if ($callback($value, $key) === false) {
                    return false;
                }
            }
        }, $column, $alias);
    }
437703
final public function resolve($alias, Collection $collection)
    {
        $alias = (string) $alias;

        $result = $this->cacheGet($alias, $collection);

        if (false === $result) {
            $result = $this->doResolve($alias, $collection);
            if (null !== $result && !$result instanceof DeltaInterface) {
                throw new ResolverException('Expected result to be either a DeltaInterface object or null.');
            }
            $this->cacheSet($alias, $collection, $result);
        }

        return $result;
    }
118077
public static Long executeManualCount(Executor executor, MappedStatement countMs,
                                          Object parameter, BoundSql boundSql,
                                          ResultHandler resultHandler) throws SQLException {
        CacheKey countKey = executor.createCacheKey(countMs, parameter, RowBounds.DEFAULT, boundSql);
        BoundSql countBoundSql = countMs.getBoundSql(parameter);
        Object countResultList = executor.query(countMs, parameter, RowBounds.DEFAULT, resultHandler, countKey, countBoundSql);
        Long count = ((Number) ((List) countResultList).get(0)).longValue();
        return count;
    }
1167078
public function countMxmaps(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
    {
        $partial = $this->collMxmapsPartial && !$this->isNew();
        if (null === $this->collMxmaps || null !== $criteria || $partial) {
            if ($this->isNew() && null === $this->collMxmaps) {
                return 0;
            }

            if ($partial && !$criteria) {
                return count($this->getMxmaps());
            }

            $query = ChildMxmapQuery::create(null, $criteria);
            if ($distinct) {
                $query->distinct();
            }

            return $query
                ->filterByMap($this)
                ->count($con);
        }

        return count($this->collMxmaps);
    }
1285906
public function storeResultAlias($deliveryExecutionId, $resultId)
    {
        $data = [
            self::DELIVERY_EXECUTION_ID => $deliveryExecutionId,
            self::RESULT_ID => $resultId,
        ];

        $queryBuilder = $this->getQueryBuilder();
        $queryBuilder->delete($this->getTableName());
        $queryBuilder->where(self::RESULT_ID . '=? OR ' . self::DELIVERY_EXECUTION_ID . '= ?');
        $queryBuilder->setParameters([$resultId, $deliveryExecutionId]);
        $res = $this->persistence->query($queryBuilder->getSQL(), $queryBuilder->getParameters())->execute();

        $result = $this->getPersistence()->insert(self::TABLE_NAME, $data) === 1;
        return $result;
    }
750472
public function write($query, array $bindings=[], $returnAffected=null)
    {
        $returnAffected = $returnAffected !== null
                          ? $returnAffected
                          : $this->getOption(static::RETURN_LAST_AFFECTED);

        $this->callBeforeListeners('write',[$query, $bindings]);

        if (!$bindings) {
            $rows = $this->writeUnprepared($query);
            $this->callAfterListeners('write',[$query, $bindings]);
            return $returnAffected ? $rows : null;
        }

        $statement = $this->runPrepared($query, $bindings);

        $this->callAfterListeners('write',[$query, $bindings]);

        return $returnAffected ? $statement->rowCount() : null;
    }
1050923
protected function hydrateSearchResults($resultSet, $type)
    {
        $results = array();
        foreach ($resultSet->results as $result) {
            $results[] = $this->hydrateObject($result, $type);
        }
        unset($result);

        return (object)array(
            'offset'  => $resultSet->offset,
            'limit'   => $resultSet->limit,
            'total'   => $resultSet->totalMatchingRecords,
            'results' => $results,
        );
    }
462530
public function map($json,&$resultObject)
    {
        if ($this->RootElement && property_exists($json, $this->RootElement)) {
            $json = $json->{$this->RootElement};
            $this->RootElement = null;
        }

        if ($resultObject instanceof IEntityType) {
            if ($resultObject instanceof IEntityTypeCollection)
                $this->mapTypeCollection($json, $resultObject);
            else
                $this->mapType($json, $resultObject);
        }
        else
            $resultObject = $json;

    }