Class Subquery
Filter.
A subquery has rather limited structure:
select {rootAlias}.{propertyName} from {entityName} {rootAlias} join {aliases...} where {filters...}
and is solely designed to nest one or more Filter in a subquery so that they can be applied to
one-to-many relations.
When more than one filter is carried they are conjoined, and the conjunction binds to a SINGLE element of the relation. That is the difference that makes this type worth having: two separate subqueries ask "some characteristic has X" AND "some characteristic has Y", whereas one subquery over two filters asks "some characteristic has X AND Y". Only the latter can express "this gene URI, as a genotype".
The root alias is used whenever null is used as object alias in the aliases or filter. It
can be declared by passing an Subquery.Alias with a null object alias and an empty property name.
- Author:
- poirgui
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanList of aliases for resolving the object alias defined infilter.The entity name being queried.The sole filter carried by this subquery.The filters being nested in the subquery, conjoined.The property name being queried.Root alias of this subquery.inthashCode()toString()withFilterPropertyName(String newPropertyName, String originalProperty) Create a new subquery with a different property name for the filters.
-
Constructor Details
-
Subquery
public Subquery(String entityName, String propertyName, List<Subquery.Alias> aliases, Filter filter) -
Subquery
-
-
Method Details
-
getFilter
The sole filter carried by this subquery.- Throws:
IllegalStateException- if this subquery carries a conjunction; callers that can encounter one must readgetFilters()and handle every conjunct.
-
withFilterPropertyName
-
toString
-
getEntityName
The entity name being queried. -
getPropertyName
The property name being queried. -
getAliases
List of aliases for resolving the object alias defined infilter. -
getRootAlias
Root alias of this subquery.If none are defined in
aliases, the defaulteis used. -
getFilters
-
equals
-
hashCode
-