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).
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
  • Method Summary

    Modifier and Type
    Method
    Description
    all(is.codion.framework.domain.entity.EntityType entityType)
     
    Collection<is.codion.framework.domain.entity.attribute.Attribute<?>>
     
     
    fetchDepth(is.codion.framework.domain.entity.attribute.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).
    Map<is.codion.framework.domain.entity.attribute.ForeignKey,Integer>
    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.
    boolean
     
    is.codion.framework.domain.entity.condition.Condition
     
    int
     
    int
     
    Optional<is.codion.framework.domain.entity.OrderBy>
     
    int
     
    is.codion.framework.domain.entity.condition.Condition
     
    where(is.codion.framework.domain.entity.condition.Condition condition)
     
  • Method Details

    • where

      is.codion.framework.domain.entity.condition.Condition where()
      Returns:
      the where condition
    • having

      is.codion.framework.domain.entity.condition.Condition having()
      Returns:
      the having condition
    • orderBy

      Optional<is.codion.framework.domain.entity.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(is.codion.framework.domain.entity.attribute.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<is.codion.framework.domain.entity.attribute.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<is.codion.framework.domain.entity.attribute.Attribute<?>> attributes()
      Returns:
      the attributes to include in the query result, an empty Collection if all should be included
    • all

      static EntityConnection.Select.Builder all(is.codion.framework.domain.entity.EntityType entityType)
      Parameters:
      entityType - the entity type
      Returns:
      a new EntityConnection.Select.Builder instance
    • where

      static EntityConnection.Select.Builder where(is.codion.framework.domain.entity.condition.Condition condition)
      Parameters:
      condition - the where condition
      Returns:
      a new EntityConnection.Select.Builder instance