Service/Account/Get.php
private function getAccount($custId, $typeId)
    {
        /** perform processing & compose result */
        /* get account by customerId & assetTypeId */
        $result = $this->daoAccount->getByCustomerId($custId, $typeId);
        if (!$result) {
            /* create new account */
            $result = new EAccount();
            $result->setCustomerId($custId);
            $result->setAssetTypeId($typeId);
            $result->setBalance(0);
            $accId = $this->daoAccount->create($result);
            $result->setId($accId);
        }
        return $result;
    }
private function getAccount($custId, $typeId)
    {
        /** perform processing & compose result */
        /* get account by customerId & assetTypeId */
        $result = $this->daoAccount->getByCustomerId($custId, $typeId);
        if (!$result) {
            /* create new account */
            $result = new EAccount();
            $result->setCustomerId($custId);
            $result->setAssetTypeId($typeId);
            $result->setBalance(0);
            $accId = $this->daoAccount->create($result);
            $result->setId($accId);
        }
        return $result;
    }
Get account by $custId & asset $typeId or create new one if not found.

@param int $custId
@param int $typeId
@return EAccount