@param Aoe_Scheduler_Model_Job $object
@param mixed                   $value
@param null                    $field

@return $this
196134
public function load(Mage_Core_Model_Abstract $object, $value, $field = null)
    {
        if (!$object instanceof Aoe_Scheduler_Model_Job) {
            throw new InvalidArgumentException(sprintf("Expected object of type 'Aoe_Scheduler_Model_Job' got '%s'", get_class($object)));
        }

        /** @var Aoe_Scheduler_Model_Job $object */

        if (!empty($field)) {
            throw new InvalidArgumentException('Aoe_Scheduler_Model_Resource_Job cannot load by any field except the job code.');
        }

        if (empty($value)) {
            $this->setModelFromJobData($object, array());
            $object->setJobCode('');
            $object->setXmlJobData(array());
            $object->setDbJobData(array());
            return $this;
        }

        $xmlJobData = $this->getJobDataFromXml($value);
        $dbJobData = $this->getJobDataFromDb($value);
        $jobData = array_merge($xmlJobData, $this->getJobDataFromConfig($value, true), $dbJobData);

        $this->setModelFromJobData($object, $jobData);
        $object->setJobCode($value);
        $object->setXmlJobData($xmlJobData);
        $object->setDbJobData($dbJobData);

        $this->unserializeFields($object);
        $this->_afterLoad($object);

        return $this;
    }
71928
public function populateManyRelation(DataObject $object, $field, $value)
    {
        // Initialise:
        
        $ids = [];
        
        // Process Value as Array:
        
        if ($value = $this->processValueAsArray($value)) {
            
            // Is Value an Associative Array?
            
            $isAssoc = ArrayLib::is_associative($value);
            
            // Output Verbose Message:
            
            $this->verboseMessage(sprintf('%s has an %s array value', $field, ($isAssoc ? 'associative' : 'indexed')));
            
            // Handle Array Values:
            
            if ($isAssoc) {
                
                foreach ($value as $k => $v) {
                    
                    if ($this->isTypedIdentifier($k)) {
                        
                        // Process Typed Identifier:
                        
                        list($class, $identifier) = $this->processTypedIdentifier($k);
                        
                        // Obtain Remote Join Field:
                        
                        if ($join = $this->getSchema()->getRemoteJoinField($object, $field)) {
                            
                            // Define Item Data:
                            
                            $data = (array) $v;
                            
                            if (!isset($data[$join])) {
                                $data[$join] = $object->ID;
                            }
                            
                            // Define Item Filter:
                            
                            $filter = [$join => $data[$join]];
                            
                            // Create Item Object:
                            
                            $this->getFactory()->createObject($class, $identifier, $data, $filter);
                            
                        }
                        
                    }
                    
                }
                
            } else {
                
                // Obtain ID List:
                
                foreach ($value as $k => $v) {
                    $ids[] = $this->processValue($v);
                }
                
                // Populate Relation:
                
                $this->populateManyRelationByIDs($object, $field, $ids);
                
            }
            
        }
        
        // Answer Object:
        
        return $object;
    }
150702
public function where($field, $operator = null, $value = null)
    {
        $this->query->where($field, $operator, $value);

        return $this;
    }
560735
public function initializeFromJob(Aoe_Scheduler_Model_Job $job)
    {
        $this->setJobCode($job->getJobCode());
        $this->setCronExpr($job->getCronExpression());
        $this->setStatus(Aoe_Scheduler_Model_Schedule::STATUS_PENDING);
        return $this;
    }
1203420
public function setField(string $field, $value)
    {
        if (isset($this->_record[$field]) && $this->_record[$field] === $value)
            return;

        $db = $this->getDB();
        $dao = $db->getDAO(static::class);
        $columns = $dao->getColumns();
        if (!isset($columns[$field]))
            throw new InvalidValueException("Field $field does not exist!");

        $pkey = $dao->getPrimaryKey();
        $coldef = $columns[$field];
        if (static::validate($coldef, $value))
        {
            $this->_record[$field] = $value;
            $this->_changed[$field] = true;

            if (isset($pkey[$field]))
                $this->_id[$field] = $value;

            // Synchronize value of local properties
            if (property_exists($this, $field))
                $this->$field = $value;
        }

        return $this;
    }
534068
public function where($field, $operator, $value = null)
    {
        if (func_num_args() === 2)
            $new = [$field, '=', $operator];
        else
            $new = func_get_args();

        $this->condition[0][] = $new;

        return $this;
    }
299677
public function setValue($field, $value) {
        if (is_array($this->values)) {
            $this->values[$field] = $value;
        } elseif (is_object($this->values)) {
            $this->values->$field = $value;
        }
    }
263057
public function set($field, $value)
    {
        if (!$this->has($field)) {
            throw new DocumentManagerException(sprintf(
                'Document "%s" must have property "%s" (it is probably required by a behavior)',
                get_class($this->document), $field
            ));
        }

        $property = $this->reflection->getProperty($field);
        $property->setAccessible(true);
        $property->setValue($this->document, $value);
    }
527689
public function offsetSet($object, $value)
    {
        if (!$object instanceof KObjectHandlable) {
            throw new InvalidArgumentException('Object needs to implement KObjectHandlable');
        }

        $this->_data[$object->getHandle()] = $object;
        return $this;
    }
885715
function setField($field, $value, $repetition = 0)
    {
        return $this->_impl->setField($field, $value, $repetition);
    }
866670
public function generateSchedulesForJob(Aoe_Scheduler_Model_Job $job)
    {
        if (!$job->canBeScheduled()) {
            return $this;
        }

        $exists = array();
        foreach ($this->getPendingSchedules(array($job->getJobCode()), array()) as $schedule) {
            /* @var Aoe_Scheduler_Model_Schedule $schedule */
            $exists[$schedule->getJobCode() . '/' . $schedule->getScheduledAt()] = 1;
        }

        $now = time();
        $scheduleAheadFor = Mage::getStoreConfig(Mage_Cron_Model_Observer::XML_PATH_SCHEDULE_AHEAD_FOR)*60;
        $timeAhead = $now + $scheduleAheadFor;

        $schedule = Mage::getModel('cron/schedule'); /* @var $schedule Aoe_Scheduler_Model_Schedule */
        $schedule->initializeFromJob($job);
        $schedule->setScheduledReason(Aoe_Scheduler_Model_Schedule::REASON_GENERATESCHEDULES);

        for ($time = $now + 60; $time < $timeAhead; $time += 60) {
            $ts = strftime('%Y-%m-%d %H:%M:00', $time);
            if (!empty($exists[$job->getJobCode().'/'.$ts])) {
                // already scheduled
                continue;
            }
            if (!$schedule->trySchedule($time)) {
                // time does not match cron expression
                continue;
            }
            $schedule->unsScheduleId()->save();
        }

        return $this;
    }
1050165
public static function setValuesToObject($object, $values = null) {
		if (! isset ( $values ))
			$values = $_POST;
		foreach ( $values as $key => $value ) {
			$accessor = "set" . ucfirst ( $key );
			if (method_exists ( $object, $accessor )) {
				$object->$accessor ( $value );
				$object->_rest [$key] = $value;
			}
		}
	}
748578
public function neq($field, $value)
    {
        return function ($object) use ($field, $value) {
            return ClosureExpressionBuilder::getObjectFieldValue($object, $field) !== $value;
        };
    }
1336198
public function setValue($object = null, $value = null)
    {
        if (!is_object($object)) {
            throw new Exception('$object is of type ' . gettype($object) . ', instance of class ' . $this->class . ' expected.', 1210859212);
        }

        if ($this->isPublic()) {
            parent::setValue($object, $value);
        } else {
            parent::setAccessible(true);
            parent::setValue($object, $value);
        }
    }
307233
private function inject(object $object, string $key, $value): object
    {
        return $this->injectionStrategy->inject($object, $key, $value);
    }
919508
public function gte($field, $value)
    {
        return function ($object) use ($field, $value) {
            return ClosureExpressionBuilder::getObjectFieldValue($object, $field) >= $value;
        };
    }
1345357
public function setField($field, $value = '')
    {
        if (is_array($field)) {
            $data = $field;
        } else {
            $data[$field] = $value;
        }
        return $this->update($data);
    }