Assigns data, stored in DB to oxorder object

@param mixed $dbRecord DB record
494114
public function assign($dbRecord)
    {
        parent::assign($dbRecord);

        $oUtilsDate = \OxidEsales\Eshop\Core\Registry::getUtilsDate();

        // convert date's to international format
        $this->oxorder__oxorderdate = new \OxidEsales\Eshop\Core\Field($oUtilsDate->formatDBDate($this->oxorder__oxorderdate->value));
        $this->oxorder__oxsenddate = new \OxidEsales\Eshop\Core\Field($oUtilsDate->formatDBDate($this->oxorder__oxsenddate->value));
    }
832989
public function setDbName($dbName = null)
    {
        $this->dbName = (null === $dbName ? Propel::getServiceContainer()->getDefaultDatasource() : $dbName);
    }
969069
public static function orderRecords(array $records, $order)
    {

        if (!is_array($order))
        {
            $order = [ $order ];
        }

        $instructions = [ ];
        foreach ($order as $property)
        {
            $property  = trim($property);
            $sortorder = substr($property, -1);

            switch ($sortorder)
            {
                case '-';
                case '+':
                    $property = substr($property, 0, -1);
                    break;
                default:
                    $sortorder = '+';
                    break;

            }

            $instructions[] = [ 'property' => $property, 'order' => $sortorder ];

        }

        uasort($records, function (Record $a, Record $b) use ($instructions)
        {

            foreach ($instructions as $instruction)
            {
                $property = $instruction['property'];
                $order    = $instruction['order'];

                switch ($property)
                {
                    case '.id':
                        $valueA = $a->getId();
                        $valueB = $b->getId();
                        break;
                    case '.info.creation.username':
                        $valueA = $a->getCreationUserInfo()->getUsername();
                        $valueB = $b->getCreationUserInfo()->getUsername();
                        break;
                    case '.info.creation.firstname':
                        $valueA = $a->getCreationUserInfo()->getFirstname();
                        $valueB = $b->getCreationUserInfo()->getFirstname();
                        break;
                    case '.info.creation.lastname':
                        $valueA = $a->getCreationUserInfo()->getLastname();
                        $valueB = $b->getCreationUserInfo()->getLastname();
                        break;
                    case '.info.creation.timestamp':
                        $valueA = $a->getCreationUserInfo()->getTimestamp();
                        $valueB = $b->getCreationUserInfo()->getTimestamp();
                        break;
                    case '.info.lastchange.username':
                        $valueA = $a->getLastChangeUserInfo()->getUsername();
                        $valueB = $b->getLastChangeUserInfo()->getUsername();
                        break;
                    case '.info.lastchange.firstname':
                        $valueA = $a->getLastChangeUserInfo()->getFirstname();
                        $valueB = $b->getLastChangeUserInfo()->getFirstname();
                        break;
                    case '.info.lastchange.lastname':
                        $valueA = $a->getLastChangeUserInfo()->getLastname();
                        $valueB = $b->getLastChangeUserInfo()->getLastname();
                        break;
                    case '.info.lastchange.timestamp':
                        $valueA = $a->getLastChangeUserInfo()->getTimestamp();
                        $valueB = $b->getLastChangeUserInfo()->getTimestamp();
                        break;
                    default:
                        $valueA = $a->getProperty($property);
                        $valueB = $b->getProperty($property);
                        break;
                }

                if ($order == '+')
                {
                    if ($valueA < $valueB)
                    {
                        return -1;
                    }
                    if ($valueA > $valueB)
                    {
                        return 1;
                    }
                }
                else
                {
                    if ($valueA > $valueB)
                    {
                        return -1;
                    }
                    if ($valueA < $valueB)
                    {
                        return 1;
                    }
                }

            }

        });

        return $records;
    }
1279459
public function store($record)
    {
        $params['index'] = $this->getName();
        $params['type'] = $record['type'];
        $params['id'] = $record['id'];
        $params['body'] = $record['data'];

        self::getClient()->index($params);
    }
1076030
public function deleteRecord(int $recordID) {
        foreach ($this->getRecords() as $key => $record) {
            if ($record['id'] == $recordID) {
                $this->database->getReference()
                    ->getChild($this->table)
                    ->getChild($key)
                    ->set(null);

                return true;
            }
        }

        return false;
    }
820902
public static function populateRecord($record, $row)
    {
        $dynCol = static::dynamicColumn();
        if (isset($row[$dynCol])) {
            $record->_dynamicAttributes = static::dynColDecode($row[$dynCol]);
        }
        parent::populateRecord($record, $row);
    }
262184
public function load($sOxId)
    {
        $sSelect = 'select oxid, oxuserid, oxpaymentsid, DECODE( oxvalue, "' . $this->getPaymentKey() . '" ) as oxvalue
                    from oxuserpayments where oxid = ' . \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->quote($sOxId);

        return $this->assignRecord($sSelect);
    }
135659
public static function setValue(DBField $dbField, $value, $record = null)
    {
        $canEdit = Controller::has_curr() && (Controller::curr() instanceof Page_Controller && Controller::curr()->data()->canEdit());
        if (!$canEdit) {
            $canEdit = is_object($record) && in_array(get_class($record), self::$EditableClasses) && method_exists($record, 'canEdit') && $record->canEdit();
        }
        if ($canEdit && $record && is_object($record) && $dbField->getName()) {
            $dbField->makeEditable  = true;
            $dbField->editClassName = $record->ClassName;
            $dbField->editID        = $record->ID;
        }
    }
1000439
public static function action_course_change_sortorder_down_one_by_record($courserecordorid) {
        if (is_int($courserecordorid)) {
            $courserecordorid = get_course($courserecordorid);
        }
        $course = new \core_course_list_element($courserecordorid);
        $category = \core_course_category::get($course->category);
        return self::action_course_change_sortorder_down_one($course, $category);
    }
971396
def __dbfRecords(self):
        """"""
        f = self.__getFileObj(self.dbf)
        for record in self.records:
            if not self.fields[0][0].startswith("Deletion"):
                f.write(b(' ')) # deletion flag
            for (fieldName, fieldType, size, dec), value in zip(self.fields, record):
                fieldType = fieldType.upper()
                size = int(size)
                if fieldType.upper() == "N":
                    value = str(value).rjust(size)
                elif fieldType == 'L':
                    value = str(value)[0].upper()
                else:
                    value = str(value)[:size].ljust(size)
                assert len(value) == size
                value = b(value)
                f.write(value)
1370977
protected function _setOrderTransactionErrorStatus(oxOrder $oOrder, stdClass $oData, $sStatus = null)
    {
        if (isset($oData->Error->Code) && (bool) $oData->Error->Code !== false) {
            if ($sStatus === null) {
                $sStatus = 'AMZ-Error-'.$oData->Error->Code;
            }

            $oOrder->assign(array('oxtransstatus' => $sStatus));
            $oOrder->save();

            return true;
        }

        return false;
    }
873282
public function setJoin(DataObject $object, $alias = null)
    {
        $this->joinRecord = $object;
        if ($alias) {
            if (static::getSchema()->fieldSpec(static::class, $alias)) {
                throw new InvalidArgumentException(
                    "Joined record $alias cannot also be a db field"
                );
            }
            $this->record[$alias] = $object;
        }
        return $this;
    }
720613
public function setDbConnection( $dbc ){
		if( !is_object( $dbc ) )
			throw new \InvalidArgumentException( 'Database connection resource must be an object' );
		if( !is_a( $dbc, 'PDO' ) )
			throw new \InvalidArgumentException( 'Database connection resource must be a direct or inherited PDO object' );
		$this->dbc = $dbc;
	}
759293
public function assign($aRecord)
    {
        startProfile('articleAssign');

        // load object from database
        parent::assign($aRecord);

        //clear seo urls
        $this->_aSeoUrls = [];

        $this->oxarticles__oxnid = $this->oxarticles__oxid;

        // check for simple article.
        if ($this->_blSkipAssign) {
            return;
        }

        $this->_assignParentFieldValues();
        $this->_assignNotBuyableParent();

        // assign only for a first load time
        if (!$this->isLoaded()) {
            $this->_setShopValues($this);
        }

        $this->_assignStock();
        $this->_assignPersistentParam();
        $this->_assignDynImageDir();
        $this->_assignComparisonListFlag();

        stopProfile('articleAssign');
    }
903651
function order($order)
    {
        if (!empty($order))
        {
            self::sql_safe($order);
            $this->order = "order by $order";
        }
        else
        {
            $this->order = '';
        }
    }
772232
protected function setPaymentInfoPayPalOrder($transactionId)
    {
        // set transaction ID and payment date to order
        $db = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();

        $query = 'update oxorder set oxtransid=' . $db->quote($transactionId) . ' where oxid=' . $db->quote($this->getId());
        $db->execute($query);

        //updating order object
        $this->oxorder__oxtransid = new \OxidEsales\Eshop\Core\Field($transactionId);
    }
689801
public function assign($dbRecord)
    {
        parent::assign($dbRecord);

        // convert date's to international format
        if ($this->oxnews__oxdate) {
            $this->oxnews__oxdate->setValue(\OxidEsales\Eshop\Core\Registry::getUtilsDate()->formatDBDate($this->oxnews__oxdate->value));
        }
    }