/** * Lookup a package key object * * @param key the key to lookup * @return the package key */ public static PackageKey lookupPackageKey(String key) { Map<String, Object> params = new HashMap<String, Object>(); params.put("key", key); PackageKey prov = (PackageKey) singleton.lookupObjectByNamedQuery("PackageKey.findByKey", params); return prov; }
/** * Looup a package provider by name * * @param name the name * @return the package provider */ public static PackageProvider lookupPackageProvider(String name) { Map<String, Object> params = new HashMap<String, Object>(); params.put("name", name); PackageProvider prov = (PackageProvider) singleton.lookupObjectByNamedQuery("PackageProvider.findByName", params); return prov; }
/** * Lookup a Package by its ID * * @param id to search for * @return the Package found */ private static Package lookupById(Long id) { Map<String, Object> params = new HashMap<String, Object>(); params.put("id", id); return (Package) singleton.lookupObjectByNamedQuery("Package.findById", params); }
/** * Lookup a package key type by label * * @param label the label of the type * @return the key type */ public static PackageKeyType lookupKeyTypeByLabel(String label) { Map<String, Object> params = new HashMap<String, Object>(); params.put("label", label); return (PackageKeyType) singleton.lookupObjectByNamedQuery("PackageKeyType.findByLabel", params); }
/** * Lookup a PackageArch by its label. * * @param label package arch label sought. * @return the PackageArch whose label matches the given label. */ public static PackageArch lookupPackageArchByLabel(String label) { Map<String, Object> params = new HashMap<String, Object>(); params.put("label", label); return (PackageArch) singleton.lookupObjectByNamedQuery("PackageArch.findByLabel", params, true); }
/** * Lookup a PackageArch by its id. * * @param id package arch label id sought. * @return the PackageArch whose id matches the given id. */ public static PackageArch lookupPackageArchById(Long id) { Map<String, Object> params = new HashMap<String, Object>(); params.put("id", id); return (PackageArch) singleton.lookupObjectByNamedQuery("PackageArch.findById", params, true); }