Interface TQAssocMany<T,R,QB>

Type Parameters:
T - The entity bean type
R - The root query bean type

public interface TQAssocMany<T,R,QB>
Expressions for Query Bean ToMany relationships.
  • Method Summary

    Modifier and Type
    Method
    Description
    filterMany(io.ebean.ExpressionList<T> filter)
    Filter the beans fetched for this relationship.
    Filter the beans fetched for this relationship.
    filterManyRaw(String rawExpressions, Object... params)
    Add filter expressions for the many path.
    Is empty for a collection property.
    Is not empty for a collection property.
  • Method Details

    • filterMany

      R filterMany(Consumer<QB> filter)
      Filter the beans fetched for this relationship.
      Parameters:
      filter - The filter to apply
    • filterMany

      R filterMany(io.ebean.ExpressionList<T> filter)
      Filter the beans fetched for this relationship.
    • filterManyRaw

      R filterManyRaw(String rawExpressions, Object... params)
      Add filter expressions for the many path. The expressions can include SQL functions if desired and the property names are translated to column names.

      The expressions can contain placeholders for bind values using ? or ?1 style.

      
      
           new QCustomer()
             .name.startsWith("Shrek")
             .contacts.filterManyRaw("status = ? and firstName like ?", Contact.Status.NEW, "Rob%")
             .findList();
      
       
      Parameters:
      rawExpressions - The raw expressions which can include ? and ?1 style bind parameter placeholders
      params - The parameter values to bind
    • isEmpty

      R isEmpty()
      Is empty for a collection property.

      This effectively adds a not exists sub-query on the collection property.

      This expression only works on OneToMany and ManyToMany properties.

    • isNotEmpty

      R isNotEmpty()
      Is not empty for a collection property.

      This effectively adds an exists sub-query on the collection property.

      This expression only works on OneToMany and ManyToMany properties.