public class FindEntityByIdentifierQuery
extends EntityQuery
Returns the list of "entity" keys possessing the keyedReferences in the passed identifier bag.
Output is restricted by list of "entity" keys passed in. If null, all entities are searched.
Output is produced by building the appropriate JPA query based on input and find qualifiers.
NOTES:
1) Identifiers are grouped with a logical OR by default.
2) In the case that the "andAllKeys" find qualifier is used the identifiers are AND'd together. The only way this can be done
with a single query was to create a self-join for each identifier. If there are a lot of identifiers, the performance could suffer.
TODO: Test performance with multiple AND'd identifiers. If too slow, look to process this query in multiple steps.
3) The "orLikeKeys" qualifier complicates matters. The "like" keys are OR'd together and these groups of "like" keys are AND'd together.
As with "andAllKeys", self-joins are created but only one for each group of "like" keys. If none of the keyedReferences passed are alike then this
will reduce to an "andAllKeys" query. If all are alike, then this will query will exhibit the default behavior of OR'ing all keys.
- Author:
- Jeff Faath