public static function hydrate(stdClass $context)
    {
        $hydrated = new ContextEntity();

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

        if (isset($context->parts)) {
            $hydrated->setParts(PartHydrator::hydrateCollection($context->parts));
        }

        return $hydrated;
    }