public static function hydrate(stdClass $library)
    {
        $hydrated = new LibraryEntity();

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

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

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

        if (isset($library->implementation)) {
            $hydrated->setImplementation($library->implementation);
        }

        if (isset($library->group)) {
            $hydrated->setGroup($library->group);
        }

        return $hydrated;
    }