/* (non-Javadoc)
@see org.apache.hive.service.cli.ICLIService#getCatalogs(org.apache.hive.service.cli.SessionHandle)
357726
@Override
  public OperationHandle getCatalogs(SessionHandle sessionHandle)
      throws HiveSQLException {
    OperationHandle opHandle = sessionManager.getSession(sessionHandle)
        .getCatalogs();
    LOG.debug(sessionHandle + ": getCatalogs()");
    return opHandle;
  }
840009
def get_collections(self):
        
        result = self.api_request('/catalog')

        # get the collection name from the url
        return [(os.path.split(x)[1], x) for x in result['collections']]
428461
def get_bins(self):
        """"""
        # Implemented from kitosid template for -
        # osid.resource.BinLookupSession.get_bins_template
        catalogs = self._get_provider_session('bin_lookup_session').get_bins()
        cat_list = []
        for cat in catalogs:
            cat_list.append(Bin(self._provider_manager, cat, self._runtime, self._proxy))
        return BinList(cat_list)
1366087
def getOrderedMapTables(self, session):
        
        return session.query(MapTable).filter(MapTable.mapTableFile == self).order_by(MapTable.name).all()
922547
func (a *Client) GetCatalogs(params *GetCatalogsParams, authInfo runtime.ClientAuthInfoWriter) (*GetCatalogsOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewGetCatalogsParams()
	}

	result, err := a.transport.Submit(&runtime.ClientOperation{
		ID:                 "GetCatalogs",
		Method:             "GET",
		PathPattern:        "/catalogs",
		ProducesMediaTypes: []string{"application/json", "application/x-gzip"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http", "https"},
		Params:             params,
		Reader:             &GetCatalogsReader{formats: a.formats},
		AuthInfo:           authInfo,
	})
	if err != nil {
		return nil, err
	}
	return result.(*GetCatalogsOK), nil
}
1232398
@Override
  public OperationHandle getFunctions(SessionHandle sessionHandle,
      String catalogName, String schemaName, String functionName) throws HiveSQLException {
    try {
      TGetFunctionsReq req = new TGetFunctionsReq(sessionHandle.toTSessionHandle(), functionName);
      req.setCatalogName(catalogName);
      req.setSchemaName(schemaName);
      TGetFunctionsResp resp = cliService.GetFunctions(req);
      checkStatus(resp.getStatus());
      TProtocolVersion protocol = sessionHandle.getProtocolVersion();
      return new OperationHandle(resp.getOperationHandle(), protocol);
    } catch (HiveSQLException e) {
      throw e;
    } catch (Exception e) {
      throw new HiveSQLException(e);
    }
  }
863888
public java.util.List<? extends com.google.appengine.v1.LibraryOrBuilder> 
      getLibrariesOrBuilderList() {
    return libraries_;
  }
1243404
@Override
  @ExperimentalApi("https://github.com/grpc/grpc-java/issues/2222")
  public List<ServerServiceDefinition> getServices() {
    return Collections.unmodifiableList(new ArrayList<>(services.values()));
  }
633839
public function getCatalogs($locale = null, $domain = null) {
		if ($locale === null && $domain === null) {
			return $this->catalogs;
		}
		
		if (is_string($locale)) {
			return $this->getSingleCatalog($locale, $domain);
		}
		
		if (is_array($locale)) {
			return $this->getManyCatalogs($locale, $domain);
		}
		
		throw new InvalidParameter('Locale must be a string or an array');
	}
801247
def get_registered_collection_resources():
    
    reg = get_current_registry()
    return [util.component
            for util in reg.registeredUtilities()
            if util.name == 'collection-class']
916179
def get_hierarchies(self):
        """"""
        # Implemented from kitosid template for -
        # osid.resource.BinLookupSession.get_bins_template
        catalogs = self._get_provider_session('hierarchy_lookup_session').get_hierarchies()
        cat_list = []
        for cat in catalogs:
            cat_list.append(Hierarchy(self._provider_manager, cat, self._runtime, self._proxy))
        return HierarchyList(cat_list)
1167691
def get_families(self):
        """"""
        # Implemented from kitosid template for -
        # osid.resource.BinLookupSession.get_bins_template
        catalogs = self._get_provider_session('family_lookup_session').get_families()
        cat_list = []
        for cat in catalogs:
            cat_list.append(Family(self._provider_manager, cat, self._runtime, self._proxy))
        return FamilyList(cat_list)
40147
def get_catalogs_by_ids(self, *args, **kwargs):
        """"""
        # Implemented from kitosid template for -
        # osid.resource.BinLookupSession.get_bins_by_ids
        catalogs = self._get_provider_session('catalog_lookup_session').get_catalogs_by_ids(*args, **kwargs)
        cat_list = []
        for cat in catalogs:
            cat_list.append(Catalog(self._provider_manager, cat, self._runtime, self._proxy))
        return CatalogList(cat_list)
316673
private final Collection<List<String>> catalogKeys(final Collection<String> keyCollections) {
    final Map<Session, List<String>> catalogMap = new HashMap<Session, List<String>>();

    for (String key : keyCollections) {
      Session index = this.sessionLocator.getSessionByKey(key);
      List<String> tmpKeys = catalogMap.get(index);
      if (tmpKeys == null) {
        tmpKeys = new ArrayList<String>(10);
        catalogMap.put(index, tmpKeys);
      }
      tmpKeys.add(key);
    }

    Collection<List<String>> catalogKeys = catalogMap.values();
    return catalogKeys;
  }
156761
@Override
  public OperationHandle getFunctions(SessionHandle sessionHandle,
      String catalogName, String schemaName, String functionName)
          throws HiveSQLException {
    return cliService.getFunctions(sessionHandle, catalogName, schemaName, functionName);
  }
1318279
@Override
    public <E> List<E> findAll(Class<E> entityClazz, String[] columnsToSelect, Object... arg1)
    {
        // TODO: Vivek correct it. unfortunately i need to open a new session
        // for each finder to avoid lazy loading.
        Session s = getSession();

        EntityMetadata entityMetadata = KunderaMetadataManager.getEntityMetadata(kunderaMetadata, getPersistenceUnit(),
                entityClazz);

        Object[] pKeys = getDataType(entityMetadata, arg1);
        String id = ((AbstractAttribute) entityMetadata.getIdAttribute()).getJPAColumnName();

        Criteria c = s.createCriteria(entityClazz);

        c.add(Restrictions.in(id, pKeys));

        return c.list();
    }
114291
private List<URL> getResources() throws IOException {
        final ClassLoader cl = getClassLoader();

        // ConcurrentHashMap doesn't support null keys, so substitute a pseudo
        // key
        final Object key = cl == null ? NULL_CLASS_LOADER : cl;

        // computeIfAbsent requires unchecked exceptions for the creation
        // process, so we
        // cannot easily use it directly, instead using get and putIfAbsent
        List<URL> newValue = cachedResourceList.get(key);
        if (newValue != null) {
            return newValue;
        }

        if (cl != null) {
            newValue = Collections
                    .unmodifiableList(Collections.list(cl.getResources(JARCACHE_JSON)));
        } else {
            newValue = Collections.unmodifiableList(
                    Collections.list(ClassLoader.getSystemResources(JARCACHE_JSON)));
        }

        final List<URL> oldValue = cachedResourceList.putIfAbsent(key, newValue);
        // We are not synchronising access to the ConcurrentMap, so if there
        // were
        // multiple classpath scans, we always choose the first one
        return oldValue != null ? oldValue : newValue;
    }