/* (non-Javadoc)
@see org.talend.esb.sam.server.persistence.dialects.DatabaseDialect#getDataQuery(org.talend.esb.sam.server.persistence.dialects.QueryFilter)
776955
@Override
    public String getDataQuery(QueryFilter filter) {
        String query = getQuery();
        String whereClause = filter.getWhereClause();
        String result = null;
        if (whereClause != null && whereClause.length() > 0) {
            result = query.replaceAll(SUBSTITUTION_STRING, " AND " + whereClause);	
        } else {
            result = query.replaceAll(SUBSTITUTION_STRING, "");
        }
        return result;
    }
101533
@Nonnull
  @Override
  public Map<String, Object> getData() {
    Map<String, Object> result = super.getData();
    Preconditions.checkNotNull(result, "Data in a QueryDocumentSnapshot should be non-null");
    return result;
  }
44186
public static String singleQuery(Map<String, String> reqData) {
		return HttpUtils.post(SDKConfig.getConfig().getSingleQueryUrl(), reqData);
	}
896097
@Override
    public String getQueryString() {
        try {
            collaborator.preInvoke(componentMetaData);
            return request.getQueryString();
        } finally {
            collaborator.postInvoke();
        }
    }
132811
public <E> List<E> findData(EntityMetadata m, Object rowKey, byte[] startRow, byte[] endRow,
            List<Map<String, Object>> columnsToOutput, Filter filters)
    {
        String tableName = HBaseUtils.getHTableName(m.getSchema(), m.getTableName());
        FilterList filterList = getFilterList(filters);
        try
        {
            return handler.readData(tableName, m, rowKey, startRow, endRow, columnsToOutput, filterList);
        }
        catch (IOException ioex)
        {
            log.error("Error during find by range, Caused by: .", ioex);
            throw new KunderaException("Error during find by range, Caused by: .", ioex);
        }
    }
1337868
public List executeQuery(String query, EntityMetadata m, KunderaQuery kunderaQuery)
    {
        DataFrame dataFrame = getDataFrame(query, m, kunderaQuery);

        // dataFrame.show();
        return dataHandler.loadDataAndPopulateResults(dataFrame, m, kunderaQuery);
    }
999983
public QueryScopeInfo getQueryServiceMetricInfo(CharacterFilter filter) {
		if (queryServiceScopeInfo == null) {
			queryServiceScopeInfo = createQueryServiceMetricInfo(filter);
		}
		return queryServiceScopeInfo;
	}
513172
public <T extends DataObject> List<T> getResults(String name, DataObject object) throws Exception {
        @SuppressWarnings("unchecked")
        ObjectMappedQuery<T> statement = (ObjectMappedQuery<T>)_statements.get(name);
        if (statement != null) {
            return statement.getResults(DataSourceUtils.getConnection(_dataSource), object);
        } else {
            throw new RuntimeException("ObjectMappedQuery '" + name + "' not found");
        }
    }
48804
public String getQuery() throws UnsupportedQueryException
   {
      if (body.getChild(0).getName().getNamespaceURI().equals("DAV:")
         && body.getChild(0).getName().getLocalPart().equals("sql"))
      {
         return body.getChild(0).getValue();
      }
      else if (body.getChild(0).getName().getNamespaceURI().equals("DAV:")
         && body.getChild(0).getName().getLocalPart().equals("xpath"))
      {
         return body.getChild(0).getValue();
      }

      throw new UnsupportedQueryException();
   }
37409
@Override
    public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) {
        Cursor result = null;

        if (!controller.hasPreinitialized()) {
            throw new IllegalStateException("Controller has not been initialized.");
        }

        int patternCode = controller.getUriMatcher().match(uri);
        MatcherPattern pattern = controller.findMatcherPattern(patternCode);
        if (pattern == null) {
            throw new IllegalArgumentException("unknown uri : " + uri.toString());
        }

        Parameter parameter = new Parameter(uri, projection, selection, selectionArgs, sortOrder);
        SQLiteDatabase db = this.getHelper().getReadableDatabase();

        result = onQuery(this.getHelper(), db, pattern, parameter);
        if (result != null) {
            this.onQueryCompleted(result, uri, pattern, parameter);
        }
        return result;
    }
696901
@Override
	public List<Map<String, Object>> query(final SqlContext sqlContext, final CaseFormat caseFormat)
			throws SQLException {
		try (Stream<Map<String, Object>> stream = query(sqlContext,
				new MapResultSetConverter(getSqlConfig().getDialect(), caseFormat))) {
			return stream.collect(Collectors.toList());
		}
	}
1194529
@NonNull public CharSequence getQuery() {
        if (searchView != null) {
            return searchView.getQuery();
        } else if (supportView != null) {
            return supportView.getQuery();
        }
        throw new IllegalStateException(ERROR_NO_SEARCHVIEW);
    }
1282052
protected Query<E> query(String queryString) {
        return currentSession().createQuery(requireNonNull(queryString), getEntityClass());
    }
1075000
public <T> T queryForObject(String sql, RowMapper<T> rowMapper) throws SQLException  {
		return (T) query(sql, rowMapper);
	}
432929
@Override
    public <T> T getParameterValue(Parameter<T> arg0)
    {

        return query.getParameterValue(arg0);
    }
648920
public InstanceQuery getQuery()
    {
        if (this.query == null) {
            try {
                this.query = new InstanceQuery(this.typeUUID)
                                .setIncludeChildTypes(isIncludeChildTypes())
                                .setCompanyDependent(isCompanyDependent());
                prepareQuery();
            } catch (final EFapsException e) {
                QueryBuilder.LOG.error("Could not open InstanceQuery for uuid: {}", this.typeUUID);
            }
        }
        return (InstanceQuery) this.query;
    }
424244
@SuppressWarnings("unchecked")
  public <T> T getQuery(String name) {
    return (T) getQuery().get(name);
  }