- java.lang.Object
-
- io.ebean.typequery.TQProperty<R>
-
- io.ebean.typequery.TQAssocBean<T,R>
-
- Type Parameters:
T- the entity bean type (normal entity bean type e.g. Customer)R- the specific root query bean type (e.g. QCustomer)
public abstract class TQAssocBean<T,R> extends TQProperty<R>
Base type for associated beans.
-
-
Field Summary
-
Fields inherited from class io.ebean.typequery.TQProperty
_name, _root
-
-
Constructor Summary
Constructors Constructor Description TQAssocBean(String name, R root)Construct with a property name and root instance.TQAssocBean(String name, R root, String prefix)Construct with additional path prefix.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Req(T other)Is equal to by ID property.RequalTo(T other)Is equal to by ID property.Rfetch()Eagerly fetch this association fetching all the properties.Rfetch(io.ebean.FetchGroup<T> nestedGroup)Fetch using the nested FetchGroup.Rfetch(String properties)Eagerly fetch this association with the properties specified.RfetchAll()Deprecated.RfetchCache()Eagerly fetch this association using L2 bean cache.RfetchCache(io.ebean.FetchGroup<T> nestedGroup)Fetch cache using the nested FetchGroup.RfetchCache(String properties)Eagerly fetch this association using L2 cache with the properties specified.protected RfetchCacheProperties(TQProperty<?>... props)Eagerly fetch this association using L2 bean cache.RfetchLazy()Use lazy loading for fetching this association.protected RfetchLazyProperties(TQProperty<?>... props)Eagerly fetch query this association fetching some of the properties.protected RfetchProperties(TQProperty<?>... props)Eagerly fetch this association fetching some of the properties.RfetchQuery()Eagerly fetch this association using a "query join".RfetchQuery(io.ebean.FetchGroup<T> nestedGroup)Fetch query using the nested FetchGroup.RfetchQuery(String properties)Eagerly fetch this association using a "query join" with the properties specified.protected RfetchQueryProperties(TQProperty<?>... props)Eagerly fetch query this association fetching some of the properties.RfilterMany(io.ebean.ExpressionList<T> filter)Apply a filter when fetching these beans.RfilterMany(String expressions, Object... params)Apply a filter when fetching these beans.RisEmpty()Is empty for a collection property.RisNotEmpty()Is not empty for a collection property.Rne(T other)Is not equal to by ID property.RnotEqualTo(T other)Is not equal to by ID property.-
Methods inherited from class io.ebean.typequery.TQProperty
expr, isNotNull, isNull, propertyName, toString
-
-
-
-
Method Detail
-
fetch
public R fetch()
Eagerly fetch this association fetching all the properties.
-
fetchQuery
public R fetchQuery()
Eagerly fetch this association using a "query join".
-
fetchCache
public R fetchCache()
Eagerly fetch this association using L2 bean cache. Cache misses are populated via fetchQuery().
-
fetchLazy
public R fetchLazy()
Use lazy loading for fetching this association.
-
fetch
public R fetch(String properties)
Eagerly fetch this association with the properties specified.
-
fetchQuery
public R fetchQuery(String properties)
Eagerly fetch this association using a "query join" with the properties specified.
-
fetchCache
public R fetchCache(String properties)
Eagerly fetch this association using L2 cache with the properties specified. Cache misses are populated via fetchQuery().
-
fetchAll
@Deprecated public R fetchAll()
Deprecated.Deprecated in favor of fetch().
-
fetchProperties
@SafeVarargs protected final R fetchProperties(TQProperty<?>... props)
Eagerly fetch this association fetching some of the properties.
-
fetchQueryProperties
@SafeVarargs protected final R fetchQueryProperties(TQProperty<?>... props)
Eagerly fetch query this association fetching some of the properties.
-
fetchCacheProperties
@SafeVarargs protected final R fetchCacheProperties(TQProperty<?>... props)
Eagerly fetch this association using L2 bean cache.
-
fetchLazyProperties
@SafeVarargs protected final R fetchLazyProperties(TQProperty<?>... props)
Eagerly fetch query this association fetching some of the properties.
-
fetchQuery
public R fetchQuery(io.ebean.FetchGroup<T> nestedGroup)
Fetch query using the nested FetchGroup.
-
fetchCache
public R fetchCache(io.ebean.FetchGroup<T> nestedGroup)
Fetch cache using the nested FetchGroup.
-
filterMany
public R filterMany(io.ebean.ExpressionList<T> filter)
Apply a filter when fetching these beans.
-
filterMany
public R filterMany(String expressions, Object... params)
Apply a filter when fetching these beans.The expressions can use any valid Ebean expression and contain placeholders for bind values using
?or?1style.new QCustomer() .name.startsWith("Postgres") .contacts.filterMany("firstName istartsWith ?", "Rob") .findList();new QCustomer() .name.startsWith("Postgres") .contacts.filterMany("whenCreated inRange ? to ?", startDate, endDate) .findList();- Parameters:
expressions- The expressions including and, or, not etc with ? and ?1 bind params.params- The bind parameter values
-
isEmpty
public 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
public 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.
-
-