Package org.apache.openjpa.jdbc.sql

Examples of org.apache.openjpa.jdbc.sql.Union$Selector


    runExample(session, reportFile);
  }

  public static void runExample(AdWordsSession session, String reportFile) throws Exception {
    // Create selector.
    Selector selector = new Selector();
    selector.getFields().addAll(Lists.newArrayList("CampaignId",
        "AdGroupId",
        "Id",
        "CriteriaType",
        "Criteria",
        "Impressions",
View Full Code Here


    runExample(session, reportFile);
  }

  public static void runExample(AdWordsSession session, String reportFile) throws Exception {
    // Create selector.
    Selector selector = new Selector();
    selector.getFields().addAll(Lists.newArrayList("CampaignId",
        "AdGroupId",
        "Id",
        "CriteriaType",
        "Criteria",
        "Impressions",
View Full Code Here

    runExample(session, reportFile);
  }

  public static void runExample(AdWordsSession session, String reportFile) throws Exception {
    // Create selector.
    Selector selector = new Selector();
    selector.getFields().addAll(Lists.newArrayList("CampaignId",
        "AdGroupId",
        "Id",
        "CriteriaType",
        "Criteria",
        "Impressions",
View Full Code Here

  // public static void runExample(AdWordsSession session, String reportFile) throws Exception {
  public static void runExample(AdWordsSession session) throws Exception {
    String output;
    // Create selector.
    Selector selector = new Selector();
    selector.getFields().addAll(Lists.newArrayList(
        "AccountCurrencyCode",
        "AccountDescriptiveName",
        "AverageCpc",
        "AverageCpm",
        "AverageTimeOnSite",
View Full Code Here

    runExample(session, reportFile);
  }

  public static void runExample(AdWordsSession session, String reportFile) throws Exception {
    // Create selector.
    Selector selector = new Selector();
    selector.getFields().addAll(Lists.newArrayList("CampaignId",
        "AdGroupId",
        "Id",
        "CriteriaType",
        "Criteria",
        "Impressions",
View Full Code Here

    reportDefinition.setReportName("");
    reportDefinition.setDateRangeType(ReportDefinitionDateRangeType.CUSTOM_DATE);
    reportDefinition.setReportType(ReportDefinitionReportType.ACCOUNT_PERFORMANCE_REPORT);
    reportDefinition.setDownloadFormat(DownloadFormat.GZIPPED_CSV);
    reportDefinition.setIncludeZeroImpressions(false);
    reportDefinition.setSelector(new Selector());

    Collection<File> results = Lists.newArrayList();

    mockedRunnableDownloader =
        new RunnableDownloader(5, 0, 10, 1L, reportDefinition, adWordsSession, results);
View Full Code Here

      ReportDefinitionReportType reportDefinitionReportType,
      ReportDefinitionDateRangeType dateRangeType, String dateStart,
      String dateEnd, Properties properties) {

    // Create the Selector with all the fields defined in the Mapping
    Selector selector = new Selector();

    List<String> reportFields = this.csvReportEntitiesMapping
        .retrievePropertiesToSelect(reportDefinitionReportType);

    // Add the inclusions from the properties file
    List<String> reportFieldsToInclude = this.getReportInclusions(
        reportDefinitionReportType, properties);
    for (String reportField : reportFields) {
      if (reportFieldsToInclude.contains(reportField)) {
        selector.getFields().add(reportField);
      }
    }
    this.adjustDateRange(reportDefinitionReportType, dateRangeType,
        dateStart, dateEnd, selector);
View Full Code Here

      ReportDefinitionReportType reportDefinitionReportType,
      ReportDefinitionDateRangeType dateRangeType, String dateStart,
      String dateEnd, List<String> reportFieldsToInclude) {

    // Create the Selector with all the fields defined in the Mapping
    Selector selector = new Selector();

    List<String> reportFields = this.csvReportEntitiesMapping
        .retrievePropertiesToSelect(reportDefinitionReportType);

    for (String reportField : reportFields) {
      if (reportFieldsToInclude.contains(reportField)) {
        selector.getFields().add(reportField);
      }
    }
    this.adjustDateRange(reportDefinitionReportType, dateRangeType,
        dateStart, dateEnd, selector);
View Full Code Here

        final JDBCFetchConfiguration fetch) throws SQLException {
        final JDBCStoreManager store = this;
        final int eager = Math.min(fetch.getEagerFetchMode(),
            JDBCFetchConfiguration.EAGER_JOIN);

        Union union = _sql.newUnion(mappings.length);
        union.setExpectedResultCount(1, false);
        if (fetch.getSubclassFetchMode(mapping) != fetch.EAGER_JOIN)
            union.abortUnion();
        union.select(new Union.Selector() {
            public void select(Select sel, int i) {
                sel.select(mappings[i], Select.SUBS_ANY_JOINABLE, store, fetch,
                    eager);
                sel.wherePrimaryKey(sm.getObjectId(), mappings[i], store);
            }
        });
        return union.execute(this, fetch);
    }
View Full Code Here

                    return rops[0];
                return new MergedResultObjectProvider(rops);
            }

            // perform a union on all independent classes
            Union union = _sql.newUnion(mappings.length);
            union.setLRS(true);
            final BitSet[] paged = new BitSet[mappings.length];
            union.select(new Union.Selector() {
                public void select(Select sel, int idx) {
                    paged[idx] = selectExtent(sel, mappings[idx], jfetch,
                        subclasses);
                }
            });
View Full Code Here

TOP

Related Classes of org.apache.openjpa.jdbc.sql.Union$Selector

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.