public static function hydrate(stdClass $process)
    {
        $hydrated = new ProcessEntity();

        if (isset($process->id)) {
            $hydrated->setId($process->id);
        }

        if (isset($process->pid)) {
            $hydrated->setPid($process->pid);
        }

        if (isset($process->version)) {
            $hydrated->setVersion($process->version);
        }

        if (isset($process->name)) {
            $hydrated->setName($process->name);
        }

        if (isset($process->started_at)) {
            $hydrated->setStartedAt(new DateTime($process->started_at));
        }

        if (isset($process->finished_at)) {
            $hydrated->setFinishedAt(new DateTime($process->finished_at));
        }

        if (isset($process->finished)) {
            $hydrated->setFinished($process->finished);
        }

        if (isset($process->memory)) {
            $hydrated->setMemory($process->memory);
        }

        if (isset($process->phase)) {
            $hydrated->setPhase($process->phase);
        }

        if (isset($process->percent)) {
            $hydrated->setPercent($process->percent);
        }

        if (isset($process->weight)) {
            $hydrated->setWeight($process->weight);
        }

        return $hydrated;
    }