Package com.data2semantics.yasgui.shared.autocompletions

Examples of com.data2semantics.yasgui.shared.autocompletions.AutocompletionsInfo


  }
 
 
 
  public AutocompletionsInfo getAutocompletionInfo() throws SQLException {
    AutocompletionsInfo completionsInfo = new AutocompletionsInfo();
   
    HashMultimap<String, FetchMethod> endpointsWithCompletions = getEndpointsWithAutocompletions(FetchType.PROPERTIES);
    for (String endpoint: endpointsWithCompletions.keySet()) {
      for (FetchMethod method: endpointsWithCompletions.get(endpoint)) {
        completionsInfo.getOrCreateEndpointInfo(endpoint).getPropertyInfo().setHasCompletions(method, true);
      }
    }
    endpointsWithCompletions = getEndpointsWithAutocompletions(FetchType.CLASSES);
    for (String endpoint: endpointsWithCompletions.keySet()) {
      for (FetchMethod method: endpointsWithCompletions.get(endpoint)) {
        completionsInfo.getOrCreateEndpointInfo(endpoint).getClassInfo().setHasCompletions(method, true);
      }
    }
    for (Entry<String, Integer> entry: getFailCountForEndpoints(FetchType.PROPERTIES).entrySet()) {
      completionsInfo.getOrCreateEndpointInfo(entry.getKey()).getPropertyInfo().setFetchFailCount(entry.getValue());
    }
    for (Entry<String, Integer> entry: getFailCountForEndpoints(FetchType.CLASSES).entrySet()) {
      completionsInfo.getOrCreateEndpointInfo(entry.getKey()).getClassInfo().setFetchFailCount(entry.getValue());
    }
    HashMultimap<String, FetchMethod> disabledPropEndpoints = getDisabledEndpointsForCompletionsFetching(FetchType.PROPERTIES);
    for (String endpoint: disabledPropEndpoints.keySet()) {
      for (FetchMethod method: disabledPropEndpoints.get(endpoint)) {
        if (method == FetchMethod.QUERY_ANALYSIS) {
          completionsInfo.getOrCreateEndpointInfo(endpoint).getPropertyInfo().setQueryAnalysisEnabled(false);
        } else if (method == FetchMethod.QUERY_RESULTS) {
          completionsInfo.getOrCreateEndpointInfo(endpoint).getPropertyInfo().setQueryResultsFetchingEnabled(false);
        }
      }
    }
    HashMultimap<String, FetchMethod> disabledClassEndpoints = getDisabledEndpointsForCompletionsFetching(FetchType.CLASSES);
    for (String endpoint: disabledClassEndpoints.keySet()) {
      for (FetchMethod method: disabledClassEndpoints.get(endpoint)) {
        if (method == FetchMethod.QUERY_ANALYSIS) {
          completionsInfo.getOrCreateEndpointInfo(endpoint).getClassInfo().setQueryAnalysisEnabled(false);
        } else if (method == FetchMethod.QUERY_RESULTS) {
          completionsInfo.getOrCreateEndpointInfo(endpoint).getClassInfo().setQueryResultsFetchingEnabled(false);
        }
      }
    }
    return completionsInfo;
  }
View Full Code Here

TOP

Related Classes of com.data2semantics.yasgui.shared.autocompletions.AutocompletionsInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.