コード例 #1
0
  /**
   * Remove the +query and +lazy secondary queries and register them with their appropriate
   * LoadBeanContext or LoadManyContext.
   *
   * <p>The parts of the secondary queries are removed and used by LoadBeanContext/LoadManyContext
   * to build the appropriate queries.
   */
  public void registerSecondaryQueries(SpiQuery<?> query) {

    secQuery = query.removeQueryJoins();
    if (secQuery != null) {
      for (int i = 0; i < secQuery.size(); i++) {
        OrmQueryProperties props = secQuery.get(i);
        registerSecondaryQuery(props);
      }
    }

    List<OrmQueryProperties> lazyQueries = query.removeLazyJoins();
    if (lazyQueries != null) {
      for (int i = 0; i < lazyQueries.size(); i++) {
        OrmQueryProperties lazyProps = lazyQueries.get(i);
        registerSecondaryQuery(lazyProps);
      }
    }
  }