code: public ExecutableQuery createExecutableQuery(SessionImpl session, SessionDataManager itemMgr, String statement,
        String language) throws InvalidQueryException
     {
        QueryImpl query =
           new QueryImpl(session, itemMgr, this, getContext().getPropertyTypeRegistry(), statement, language,
              getQueryNodeFactory());
        query.setRespectDocumentOrder(documentOrder);
        return query;
     }
docs: Creates a new query by specifying the query statement itself and the
  language in which the query is stated. If the query statement is
  syntactically invalid, given the language specified, an
  InvalidQueryException is thrown. <code>language</code> must specify a
  query language string from among those returned by
  QueryManager.getSupportedQueryLanguages(); if it is not then an
  <code>InvalidQueryException</code> is thrown.
  
  @param session
  the session of the current user creating the query object.
  @param itemMgr
  the item manager of the current user.
  @param statement
  the query statement.
  @param language
  the syntax of the query statement.
  @throws InvalidQueryException
  if statement is invalid or language is unsupported.
  @return A <code>Query</code> object.