org.apache.juddi.query
Class FindEntityByCombinedCategoryQuery

java.lang.Object
  extended by org.apache.juddi.query.EntityQuery
      extended by org.apache.juddi.query.FindEntityByCategoryQuery
          extended by org.apache.juddi.query.FindEntityByCombinedCategoryQuery

public class FindEntityByCombinedCategoryQuery
extends FindEntityByCategoryQuery

Returns the list of "entity" keys possessing the keyedReferences passed in or the level below. For findBusiness queries, this means keyedReferences on the businessEntity and service levels, and for findService queries this means keyedReferences on the service and serviceBinding level. 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. From the spec : * From specification: "combineCategoryBags: this may only be used in the find_business and find_service calls. In the case of find_business, this qualifier makes the categoryBag entries for the full businessEntity element behave as though all categoryBag elements found at the businessEntity level and in all contained or referenced businessService elements and bindingTemplate elements were combined. Searching for a category will yield a positive match on a registered business if any of the categoryBag elements contained within the full businessEntity element (including the categoryBag elements within contained or referenced businessService elements or bindingTemplate elements) contains the filter criteria. In the case of find_service, this qualifier makes the categoryBag entries for the full businessService element behave as though all categoryBag elements found at the businessService level and in all contained or referenced elements in the bindingTemplate elements were combined. Searching for a category will yield a positive match on a registered service if any of the categoryBag elements contained within the full businessService element (including the categoryBag elements within contained or referenced bindingTemplate elements) contains the filter criteria. This find qualifier does not cause the keyedReferences in categoryBags to be combined with the keyedReferences in keyedReferenceGroups in categoryBags when performing the comparison. The keyedReferences are combined with each other, and the keyedReferenceGroups are combined with each other." NOTES: 1) Categories are grouped with a logical AND by default. 2) Concerning when the categories are AND'd together - the only way this can be done with a single query was to create a self-join for each category. If there are a lot of categories, the performance could suffer. TODO: Test performance with multiple AND'd categories. 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 behavior of OR'ing all keys.

Author:
Jeff Faath, Tom Cunningham, Kurt Stam

Field Summary
protected  String entityAliasChild2
           
protected  String entityAliasChild3
           
protected  String entityField2
           
protected  String entityField3
           
protected  String entityNameChild2
           
protected  String entityNameChild3
           
protected  String signaturePresent
           
 
Fields inherited from class org.apache.juddi.query.FindEntityByCategoryQuery
entityAlias, entityAliasChild, entityField, entityName, entityNameChild, keyName, selectSQL
 
Fields inherited from class org.apache.juddi.query.EntityQuery
DEFAULT_MAXINCLAUSE, DEFAULT_MAXROWS, KEY_NAME, SIGNATURE_FIELD, TEMP_ENTITY_ALIAS, TEMP_ENTITY_NAME, TEMP_ENTITY_PK_KEY_NAME, TEMP_ENTITY_PK_TXID_NAME
 
Constructor Summary
FindEntityByCombinedCategoryQuery(String entityName, String entityAlias, String keyName, String entityField, String entityNameChild, String signaturePresent)
           
FindEntityByCombinedCategoryQuery(String entityName, String entityAlias, String keyName, String entityField, String entityNameChild, String entityField2, String entityNameChild2, String entityField3, String entityNameChild3, String signaturePresent)
           
 
Method Summary
 String getEntityAliasChild2()
           
 String getEntityAliasChild3()
           
 String getEntityNameChild2()
           
 String getEntityNameChild3()
           
 List<?> select(javax.persistence.EntityManager em, FindQualifiers fq, CategoryBag categoryBag, List<?> keysIn, DynamicQuery.Parameter... restrictions)
           
 
Methods inherited from class org.apache.juddi.query.FindEntityByCategoryQuery
appendConditions, appendJoinTables, getEntityAlias, getEntityAliasChild, getEntityField, getEntityName, getEntityNameChild, getKeyName, getSelectSQL, getSignaturePresent, setSignaturePresent
 
Methods inherited from class org.apache.juddi.query.EntityQuery
buildAlias, getPagedResult, getQueryResult, storeIntermediateKeySetResults
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

entityField2

protected String entityField2

entityNameChild2

protected String entityNameChild2

entityAliasChild2

protected String entityAliasChild2

entityField3

protected String entityField3

entityNameChild3

protected String entityNameChild3

entityAliasChild3

protected String entityAliasChild3

signaturePresent

protected String signaturePresent
Constructor Detail

FindEntityByCombinedCategoryQuery

public FindEntityByCombinedCategoryQuery(String entityName,
                                         String entityAlias,
                                         String keyName,
                                         String entityField,
                                         String entityNameChild,
                                         String signaturePresent)

FindEntityByCombinedCategoryQuery

public FindEntityByCombinedCategoryQuery(String entityName,
                                         String entityAlias,
                                         String keyName,
                                         String entityField,
                                         String entityNameChild,
                                         String entityField2,
                                         String entityNameChild2,
                                         String entityField3,
                                         String entityNameChild3,
                                         String signaturePresent)
Method Detail

getEntityNameChild2

public String getEntityNameChild2()

getEntityAliasChild2

public String getEntityAliasChild2()

getEntityNameChild3

public String getEntityNameChild3()

getEntityAliasChild3

public String getEntityAliasChild3()

select

public List<?> select(javax.persistence.EntityManager em,
                      FindQualifiers fq,
                      CategoryBag categoryBag,
                      List<?> keysIn,
                      DynamicQuery.Parameter... restrictions)
Overrides:
select in class FindEntityByCategoryQuery


Copyright © 2004-2013 The Apache Software Foundation. All Rights Reserved.