001package io.ebean.service;
002
003import io.ebean.FetchGroup;
004import io.ebean.FetchGroupBuilder;
005
006/**
007 * Service that parses FetchGroup expressions.
008 */
009public interface SpiFetchGroupService {
010
011  /**
012   * Return the FetchGroup with the given select clause.
013   *
014   * @param beanType The type of entity bean the fetch group is for
015   * @param select   The properties to select (top level properties)
016   */
017  <T> FetchGroup<T> of(Class<T> beanType, String select);
018
019  /**
020   * Create and return a FetchGroupBuilder starting with a select() clause.
021   *
022   * @param beanType The type of entity bean the fetch group is for
023   * @return The FetchGroupBuilder to add additional select and fetch clauses
024   */
025  <T> FetchGroupBuilder<T> of(Class<T> beanType);
026
027  /**
028   * Return a new FetchGroupQuery for building FetchGroup via query beans.
029   */
030  <T> SpiFetchGroupQuery<T> queryFor(Class<T> beanType);
031
032}