Interface EntityConnection.Select

Enclosing interface:
EntityConnection

public static interface EntityConnection.Select
A class encapsulating select query parameters. A factory class for EntityConnection.Select.Builder instances via all(EntityType), where(Condition).
  • Method Details

    • where

      Condition where()
      Returns:
      the where condition
    • having

      Condition having()
      Returns:
      the having condition
    • orderBy

      Optional<OrderBy> orderBy()
      Returns:
      the OrderBy for this condition, an empty Optional if none is specified
    • limit

      int limit()
      Returns:
      the limit to use for the given condition, -1 for no limit
    • offset

      int offset()
      Returns:
      the offset to use for the given condition, -1 for no offset
    • forUpdate

      boolean forUpdate()
      Returns:
      true if this select should lock the result for update
    • queryTimeout

      int queryTimeout()
      Returns:
      the query timeout
    • fetchDepth

      Optional<Integer> fetchDepth()
      Returns:
      the global fetch depth limit for this condition, an empty Optional if none has been specified
    • fetchDepth

      Optional<Integer> fetchDepth(ForeignKey foreignKey)
      Returns the number of levels of foreign key values to fetch, with 0 meaning no referenced entities should be fetched, -1 no limit and an empty Optional if unspecified (use default).
      Parameters:
      foreignKey - the foreign key
      Returns:
      the number of levels of foreign key values to fetch
    • foreignKeyFetchDepths

      Map<ForeignKey,Integer> foreignKeyFetchDepths()
      Returns a map containing the number of levels of foreign key values to fetch per foreign key, with 0 meaning no referenced entities should be fetched, -1 no limit.
      Returns:
      a map containing the number of levels of foreign key values to fetch for each foreign key
    • attributes

      Collection<Attribute<?>> attributes()
      Returns:
      the attributes to include in the query result, an empty Collection if all should be included
    • all

      Parameters:
      entityType - the entity type
      Returns:
      a new EntityConnection.Select.Builder instance
    • where

      static EntityConnection.Select.Builder where(Condition condition)
      Parameters:
      condition - the where condition
      Returns:
      a new EntityConnection.Select.Builder instance