Get packages by instance ID
@param {string} id - Package instance ID
@return {array} data store object
970353
function getItem(id) {
  return new Promise((resolve, reject) => {
    return instance.pkgs.then(db => {
      const req = db.transaction(db.name)
        .objectStore(db.name).get(id);
      req.onsuccess = event => resolve(event.target.result);
      req.onerror = event => reject(event);
    });
  });
}
563603
function findById (id) {
  return new Promise(async (resolve, reject) => {
    try {
      if (!id || !id.length) {
        throw new Error('Undefined parameter id!');
      }

      const ports = await this.find();
      const result = ports.filter(port => port.info.includes(id));

      if (!result.length) {
        resolve(null);
      } else {
        resolve(result[0]);
      }
    } catch (error) {
      reject(error);
    }
  });
}
537136
def get_playlist(id)
      result = playlists.select { |p| p.id == id }
      result.nil? ? nil : result.first
    end
581306
public Binary getBinaryById(int id) {
        for (Binary binary : binaryList) {
            if (binary.getId() == id) {
                return binary;
            }
        }

        return null;
    }
149995
function(id) {
			var i;
			for (i = files.length - 1; i >= 0; i--) {
				if (files[i].id === id) {
					return files[i];
				}
			}
		}
1271365
@Path("{id}")
    public InstanceResource getInstanceInfo(@PathParam("id") String id) {
        return new InstanceResource(this, id, serverConfig, registry);
    }
57872
public final DatastoreConfig getDatastoreConfig(String id) {
        try{
            return m_moduleContext.getBean(id,DatastoreConfiguration.class);
        }
        catch (Throwable t){
            logger.info(t.getMessage(),t);
            return null;
        }
    }
780767
async function fetch(
  serviceInstance,
  { baseUrl, packageName, includePrereleases = false }
) {
  const json = await serviceInstance._requestJson({
    schema,
    url: await searchQueryServiceUrl(baseUrl),
    options: {
      qs: {
        q: `packageid:${encodeURIComponent(packageName.toLowerCase())}`,
        // Include prerelease versions.
        prerelease: 'true',
        // Include packages with SemVer 2 version numbers.
        semVerLevel: '2',
      },
    },
  })

  if (json.data.length === 1) {
    return json.data[0]
  } else {
    throw new NotFound({ prettyMessage: 'package not found' })
  }
}
1169671
public Object getObjectWithId( IdKey id ) {
        if ( null != idToObject ) {
            return idToObject.get( id );
        }
        return null;
    }
999215
function(id) {
      var self = this;

      if (typeof id === 'undefined') {
        var ids = [];
        for (var i=0; i<self._sounds.length; i++) {
          ids.push(self._sounds[i]._id);
        }

        return ids;
      } else {
        return [id];
      }
    }
140493
function (callback, id) {
        if (id === undefined && storeObjectId) {
          id = storeObjectId
        }
        getById(callback, 'stores', id)
      }
25852
def get(id)
      return unless id
      with_redis { |redis| redis.get(redis_key_for(id)).try { |data| load(data) } }
    end
956256
def get_sdc_by_id(self, id):
        
        for sdc in self.sdc:
            if sdc.id == id:
                return sdc
        raise KeyError("SDC with that ID not found")
942945
public static BaasResult<JsonObject> fetchDataSync(String id){
        if (id == null) throw new IllegalArgumentException("asset id cannot be null");
        BaasBox box = BaasBox.getDefaultChecked();
        AssetDataRequest req = new AssetDataRequest(box,id, RequestOptions.DEFAULT,null);
        return box.submitSync(req);
    }
654100
def _get_id(self, id_, pkg_name):
        
        collection = JSONClientValidated('id',
                                         collection=pkg_name + 'Ids',
                                         runtime=self._runtime)
        try:
            result = collection.find_one({'aliasIds': {'$in': [str(id_)]}})
        except errors.NotFound:
            return id_
        else:
            return Id(result['_id'])
1261807
Package getPackage(IntermediateParseResults intermediateResults, String packageId) {
    Package aPackage = intermediateResults.getPackage(packageId);
    if (aPackage == null) {
      aPackage = dataService.findOneById(PackageMetadata.PACKAGE, packageId, Package.class);
    }
    return aPackage;
  }
419748
function get(id, store) {
      var data = store.rootData.asObject();
      // Get item from data object
      return data[id]
        ? data[id]
        : vcomet.error.log("store", "Item with id " + id + " not found");
    }