code: private String replaceProject(String query, boolean online) {
  
          return query.replace("%(PROJECT)", online ? ONLINE : OFFLINE);
      }
docs: Replaces the %(PROJECT) macro inside a query with either ONLINE or OFFLINE, depending on the value
  of a flag.<p>
  
  We use this instead of the ${PROJECT} replacement mechanism when we need explicit control over the
  project, and don't want to implicitly use the project of the DB context.<p>
  
  @param query the query in which the macro should be replaced
  @param online if true, the macro will be replaced with "ONLINE", else "OFFLINE"
  
  @return the query with the replaced macro