juddi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexo...@apache.org
Subject juddi git commit: JUDDI-992 fix for several issues with find binding with and without the service key. Also had to do some light refactoring of List<?> to List<Object> for many of the apis in juddi-core. Shouldn't effect too many users.
Date Sun, 18 Nov 2018 18:18:41 GMT
Repository: juddi
Updated Branches:
  refs/heads/master 926428dba -> 2f5a2492e


JUDDI-992 fix for several issues with find binding with and without the service key. Also had to do some light refactoring of List<?> to List<Object> for many of the apis in juddi-core. Shouldn't effect too many users.


Project: http://git-wip-us.apache.org/repos/asf/juddi/repo
Commit: http://git-wip-us.apache.org/repos/asf/juddi/commit/2f5a2492
Tree: http://git-wip-us.apache.org/repos/asf/juddi/tree/2f5a2492
Diff: http://git-wip-us.apache.org/repos/asf/juddi/diff/2f5a2492

Branch: refs/heads/master
Commit: 2f5a2492e49a64da73e29bc5ba0a8bf151b49bdb
Parents: 926428d
Author: Alex O'Ree <alexoree@apache.org>
Authored: Sun Nov 18 13:18:37 2018 -0500
Committer: Alex O'Ree <alexoree@apache.org>
Committed: Sun Nov 18 13:18:37 2018 -0500

----------------------------------------------------------------------
 .../apache/juddi/api/impl/InquiryHelper.java    | 40 +++++----
 .../apache/juddi/api/impl/UDDIInquiryImpl.java  | 32 ++++---
 .../org/apache/juddi/query/EntityQuery.java     | 47 +++++-----
 .../query/FindBindingByCategoryGroupQuery.java  |  2 +-
 .../juddi/query/FindBindingByCategoryQuery.java |  2 +-
 .../query/FindBindingByTModelKeyQuery.java      |  8 +-
 .../query/FindBusinessByCategoryGroupQuery.java |  2 +-
 .../query/FindBusinessByCategoryQuery.java      |  2 +-
 .../FindBusinessByCombinedCategoryQuery.java    |  2 +-
 .../query/FindBusinessByDiscoveryURLQuery.java  |  4 +-
 .../query/FindBusinessByIdentifierQuery.java    |  2 +-
 .../juddi/query/FindBusinessByNameQuery.java    |  2 +-
 .../query/FindBusinessByTModelKeyQuery.java     |  2 +-
 .../query/FindEntityByCategoryGroupQuery.java   | 18 ++--
 .../juddi/query/FindEntityByCategoryQuery.java  |  2 +-
 .../FindEntityByCombinedCategoryQuery.java      |  8 +-
 .../query/FindEntityByIdentifierQuery.java      |  2 +-
 .../juddi/query/FindEntityByNamesQuery.java     |  2 +-
 .../query/FindServiceByCategoryGroupQuery.java  |  2 +-
 .../juddi/query/FindServiceByCategoryQuery.java |  2 +-
 .../FindServiceByCombinedCategoryQuery.java     |  2 +-
 .../juddi/query/FindServiceByNameQuery.java     |  2 +-
 .../query/FindServiceByTModelKeyQuery.java      |  2 +-
 .../query/FindTModelByCategoryGroupQuery.java   |  2 +-
 .../juddi/query/FindTModelByCategoryQuery.java  |  2 +-
 .../query/FindTModelByIdentifierQuery.java      |  2 +-
 .../juddi/query/FindTModelByNameQuery.java      |  2 +-
 .../juddi/validation/ValidateInquiry.java       | 43 ++++++++-
 .../juddi/api/impl/API_070_FindEntityTest.java  | 91 +++++++++++++++++++-
 .../org/apache/juddi/v2/tck/TckFindEntity.java  |  6 +-
 .../joepublisher/bindingTemplate.xml            |  4 +-
 31 files changed, 239 insertions(+), 102 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/juddi/blob/2f5a2492/juddi-core/src/main/java/org/apache/juddi/api/impl/InquiryHelper.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/api/impl/InquiryHelper.java b/juddi-core/src/main/java/org/apache/juddi/api/impl/InquiryHelper.java
index 1b3b9b9..b4b88ed 100644
--- a/juddi-core/src/main/java/org/apache/juddi/api/impl/InquiryHelper.java
+++ b/juddi-core/src/main/java/org/apache/juddi/api/impl/InquiryHelper.java
@@ -18,9 +18,8 @@ package org.apache.juddi.api.impl;
 
 import java.util.ArrayList;
 import java.util.Date;
+import java.util.LinkedList;
 import java.util.List;
-import java.util.logging.Level;
-import java.util.logging.Logger;
 
 import javax.persistence.EntityManager;
 import javax.xml.ws.Holder;
@@ -31,6 +30,7 @@ import org.apache.commons.logging.LogFactory;
 import org.apache.juddi.config.AppConfig;
 import org.apache.juddi.config.Property;
 import org.apache.juddi.mapping.MappingModelToApi;
+import org.apache.juddi.model.BindingTemplate;
 import org.apache.juddi.query.FetchBindingTemplatesQuery;
 import org.apache.juddi.query.FetchBusinessEntitiesQuery;
 import org.apache.juddi.query.FetchBusinessServicesQuery;
@@ -82,15 +82,17 @@ public class InquiryHelper {
 
 	private static Log logger = LogFactory.getLog(InquiryHelper.class);
 	
-	public static List<?> findBinding(FindBinding body, FindQualifiers findQualifiers, EntityManager em) throws DispositionReportFaultMessage {
+	public static List<Object> findBinding(FindBinding body, FindQualifiers findQualifiers, EntityManager em) throws DispositionReportFaultMessage {
 
-		List<?> keysFound = null;
-
-		// First perform the embedded FindTModel search which will augment the tModel bag with any resulting tModel keys.
+		List<Object> keysFound = new LinkedList<Object>();
+                if (body.getServiceKey()!=null && body.getServiceKey().length() > 0) {
+                    keysFound = findBindingsByServiceKey(em, body.getServiceKey(), keysFound);
+                }
+		
 		if (body.getTModelBag() == null)
 			body.setTModelBag(new TModelBag());
+                // First perform the embedded FindTModel search which will augment the tModel bag with any resulting tModel keys.
 		doFindTModelEmbeddedSearch(em, body.getFindQualifiers(), body.getFindTModel(), body.getTModelBag());
-		
 		keysFound = FindBindingByTModelKeyQuery.select(em, findQualifiers, body.getTModelBag(), body.getServiceKey(), keysFound);
 		keysFound = FindBindingByCategoryQuery.select(em, findQualifiers, body.getCategoryBag(), body.getServiceKey(), keysFound);
 		keysFound = FindBindingByCategoryGroupQuery.select(em, findQualifiers, body.getCategoryBag(), body.getServiceKey(), keysFound);
@@ -168,9 +170,9 @@ public class InquiryHelper {
 		return result;
 	}	
 	
-	public static List<?> findBusiness(FindBusiness body, FindQualifiers findQualifiers, EntityManager em) throws DispositionReportFaultMessage {
+	public static List<Object> findBusiness(FindBusiness body, FindQualifiers findQualifiers, EntityManager em) throws DispositionReportFaultMessage {
 
-		List<?> keysFound = null;
+		List<Object> keysFound = null;
 
 		// First perform the embedded FindTModel search which will augment the tModel bag with any resulting tModel keys.
 		if (body.getTModelBag() == null)
@@ -192,7 +194,7 @@ public class InquiryHelper {
 			else if (body.getFindRelatedBusinesses().getToKey() != null)
 				getRelatedBusinesses(em, Direction.TO_KEY, frb.getToKey(), frb.getKeyedReference(), relatedBusinessInfos);
 			
-			List<String> relatedBusinessKeys = new ArrayList<String>(0);
+			List<Object> relatedBusinessKeys = new ArrayList<Object>(0);
 			for (org.uddi.api_v3.RelatedBusinessInfo rbi : relatedBusinessInfos.getRelatedBusinessInfo())
 				relatedBusinessKeys.add(rbi.getBusinessKey());
 			
@@ -322,7 +324,7 @@ public class InquiryHelper {
 	
 	public static List<?> findService(FindService body, FindQualifiers findQualifiers, EntityManager em) throws DispositionReportFaultMessage {
 
-		List<?> keysFound = null;
+		List<Object> keysFound = null;
 
 		// First perform the embedded FindTModel search which will augment the tModel bag with any resulting tModel keys.
 		if (body.getTModelBag() == null)
@@ -419,8 +421,8 @@ public class InquiryHelper {
 		return result;
 	}
 
-	public static List<?> findTModel(FindTModel body, FindQualifiers findQualifiers, EntityManager em) throws DispositionReportFaultMessage {
-		List<?> keysFound = null;
+	public static List<Object> findTModel(FindTModel body, FindQualifiers findQualifiers, EntityManager em) throws DispositionReportFaultMessage {
+		List<Object> keysFound = null;
 
 		keysFound = FindTModelByIdentifierQuery.select(em, findQualifiers, body.getIdentifierBag(), keysFound);
 		keysFound = FindTModelByCategoryQuery.select(em, findQualifiers, body.getCategoryBag(), keysFound);
@@ -608,7 +610,7 @@ public class InquiryHelper {
 		return result;
 	}
 		
-	/*
+	/**
 	 * Performs the necessary queries for the find_tModel search and adds resulting tModel keys to the tModelBag provided.
 	 */
 	private static void doFindTModelEmbeddedSearch(EntityManager em, 
@@ -623,7 +625,7 @@ public class InquiryHelper {
 			findQualifiers.mapApiFindQualifiers(findTmodel.getFindQualifiers());
 
 			
-			List<?> tmodelKeysFound = null;
+			List<Object> tmodelKeysFound = null;
 			tmodelKeysFound = FindTModelByIdentifierQuery.select(em, findQualifiers, findTmodel.getIdentifierBag(), tmodelKeysFound);
 			tmodelKeysFound = FindTModelByCategoryQuery.select(em, findQualifiers, findTmodel.getCategoryBag(), tmodelKeysFound);
 			tmodelKeysFound = FindTModelByCategoryGroupQuery.select(em, findQualifiers, findTmodel.getCategoryBag(), tmodelKeysFound);
@@ -635,6 +637,14 @@ public class InquiryHelper {
 			}
 		}
 	}
+
+    private static List<Object> findBindingsByServiceKey(EntityManager em, String serviceKey, List<Object> keysFound) {
+        org.apache.juddi.model.BusinessService modelBusinessService=em.find(org.apache.juddi.model.BusinessService.class, serviceKey);
+        for (BindingTemplate bt : modelBusinessService.getBindingTemplates()){
+            keysFound.add(bt.getEntityKey());
+        }
+        return keysFound;
+    }
 	
 	
 }

http://git-wip-us.apache.org/repos/asf/juddi/blob/2f5a2492/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIInquiryImpl.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIInquiryImpl.java b/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIInquiryImpl.java
index 8067a76..701f5f8 100644
--- a/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIInquiryImpl.java
+++ b/juddi-core/src/main/java/org/apache/juddi/api/impl/UDDIInquiryImpl.java
@@ -134,7 +134,7 @@ public class UDDIInquiryImpl extends AuthenticatedService implements UDDIInquiry
                     serviceCounter.update(InquiryQuery.FIND_BINDING, QueryStatus.FAILED, procTime);                      
                     throw drfm;
                 }
-
+                
 		EntityManager em = PersistenceManager.getEntityManager();
 		EntityTransaction tx = em.getTransaction();
 		try {
@@ -144,27 +144,25 @@ public class UDDIInquiryImpl extends AuthenticatedService implements UDDIInquiry
 				this.getEntityPublisher(em, body.getAuthInfo());
 
                         LogFindBindingRequest(body);
+                        if (body.getServiceKey() != null && body.getServiceKey().length() > 0) {
+                            // Check that we were passed a valid serviceKey per
+                            // 5.1.12.4 of the UDDI v3 spec
+                            String serviceKey = body.getServiceKey();
+                            org.apache.juddi.model.BusinessService modelBusinessService = null;
+                            try {
+                                    modelBusinessService=em.find(org.apache.juddi.model.BusinessService.class, serviceKey);
+                            } catch (Exception e) {
+                                    log.debug(e.getMessage(), e);
+                            }
+                            if (modelBusinessService == null)
+                                throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.ServiceNotFound", serviceKey));
+                        }
+
 			org.apache.juddi.query.util.FindQualifiers findQualifiers = new org.apache.juddi.query.util.FindQualifiers();
 			findQualifiers.mapApiFindQualifiers(body.getFindQualifiers());
 
 			List<?> keysFound = InquiryHelper.findBinding(body, findQualifiers, em);
 
-			if (keysFound!=null && keysFound.size() == 0) {
-			    if (body.getServiceKey() != null) {
-			        // Check that we were passed a valid serviceKey per
-        			// 5.1.12.4 of the UDDI v3 spec
-        			String serviceKey = body.getServiceKey();
-        			org.apache.juddi.model.BusinessService modelBusinessService = null;
-        			try {
-        				modelBusinessService=em.find(org.apache.juddi.model.BusinessService.class, serviceKey);
-        			} catch (Exception e) {
-                                        log.debug(e.getMessage(), e);
-                                }
-	                if (modelBusinessService == null)
-	                    throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.ServiceNotFound", serviceKey));
-
-			    }
-			}
 			BindingDetail result = InquiryHelper.getBindingDetailFromKeys(body, findQualifiers, em, keysFound);
 			tx.rollback();
                         long procTime = System.currentTimeMillis() - startTime;

http://git-wip-us.apache.org/repos/asf/juddi/blob/2f5a2492/juddi-core/src/main/java/org/apache/juddi/query/EntityQuery.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/query/EntityQuery.java b/juddi-core/src/main/java/org/apache/juddi/query/EntityQuery.java
index 5d375a0..b8558aa 100644
--- a/juddi-core/src/main/java/org/apache/juddi/query/EntityQuery.java
+++ b/juddi-core/src/main/java/org/apache/juddi/query/EntityQuery.java
@@ -124,7 +124,7 @@ public abstract class EntityQuery {
 	 * Used for all the find operation sub-queries.  Restricts size of the IN clause based on global parameter
 	 */
 	@SuppressWarnings("unchecked")
-	public static List<?> getQueryResult(EntityManager em, DynamicQuery dynamicQry, List<?> keysIn, String inListTerm) {
+	public static List<Object> getQueryResult(EntityManager em, DynamicQuery dynamicQry, List<?> keysIn, String inListTerm) {
 		
 		List<Object> result = new ArrayList<Object>(0);
 		// If keysIn is null, then no IN list is applied to the query - we simply need to run the query.  Otherwise, the IN list is chunked based on
@@ -142,26 +142,31 @@ public abstract class EntityQuery {
 			catch(ConfigurationException ce) {
 				log.error("Configuration exception occurred retrieving: " + Property.JUDDI_MAX_IN_CLAUSE);
 			}
-			
-			int inParamsLeft = keysIn.size();
-			int startIndex = 0;
-			while(inParamsLeft > 0) {
-				int endIndex = startIndex + Math.min(inParamsLeft, maxInClause);
-				
-				List<Object> subKeysIn = new ArrayList<Object>(endIndex);
-				for (int i=startIndex; i< endIndex; i++) {
-					subKeysIn.add(keysIn.get(i));
-				}
-				dynamicQry.appendInListWithAnd(inListTerm, subKeysIn);
-				log.debug(dynamicQry);
-	
-				Query qry = dynamicQry.buildJPAQuery(em);
-				List<Object> resultChunk = qry.getResultList();
-				result.addAll(resultChunk);
-				
-				inParamsLeft = inParamsLeft - (endIndex - startIndex);
-				startIndex = endIndex;
-			}
+			if (keysIn.isEmpty()) {
+                            Query qry = dynamicQry.buildJPAQuery(em);
+                            List<Object> resultChunk = qry.getResultList();
+                            result.addAll(resultChunk);
+                        } else {
+                            int inParamsLeft = keysIn.size();
+                            int startIndex = 0;
+                            while(inParamsLeft > 0) {
+                                    int endIndex = startIndex + Math.min(inParamsLeft, maxInClause);
+
+                                    List<Object> subKeysIn = new ArrayList<Object>(endIndex);
+                                    for (int i=startIndex; i< endIndex; i++) {
+                                            subKeysIn.add(keysIn.get(i));
+                                    }
+                                    dynamicQry.appendInListWithAnd(inListTerm, subKeysIn);
+                                    log.debug(dynamicQry);
+
+                                    Query qry = dynamicQry.buildJPAQuery(em);
+                                    List<Object> resultChunk = qry.getResultList();
+                                    result.addAll(resultChunk);
+
+                                    inParamsLeft = inParamsLeft - (endIndex - startIndex);
+                                    startIndex = endIndex;
+                            }
+                        }
 		}
 		
 		return result;

http://git-wip-us.apache.org/repos/asf/juddi/blob/2f5a2492/juddi-core/src/main/java/org/apache/juddi/query/FindBindingByCategoryGroupQuery.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/query/FindBindingByCategoryGroupQuery.java b/juddi-core/src/main/java/org/apache/juddi/query/FindBindingByCategoryGroupQuery.java
index 14fd594..e65cbfc 100644
--- a/juddi-core/src/main/java/org/apache/juddi/query/FindBindingByCategoryGroupQuery.java
+++ b/juddi-core/src/main/java/org/apache/juddi/query/FindBindingByCategoryGroupQuery.java
@@ -58,7 +58,7 @@ public class FindBindingByCategoryGroupQuery {
 													   BindingTemplateQuery.SIGNATURE_PRESENT);
 	}
 	
-	public static List<?> select(EntityManager em, FindQualifiers fq, CategoryBag categoryBag, String parentKey, List<?> keysIn) {
+	public static List<Object> select(EntityManager em, FindQualifiers fq, CategoryBag categoryBag, String parentKey, List<Object> keysIn) {
 		if (parentKey != null && parentKey.length() > 0) {
 			DynamicQuery.Parameter param = new DynamicQuery.Parameter(BindingTemplateQuery.ENTITY_ALIAS + "." + BindingTemplateQuery.KEY_NAME_PARENT, parentKey, DynamicQuery.PREDICATE_EQUALS); 
 			return findQuery.select(em, fq, categoryBag, keysIn, param);

http://git-wip-us.apache.org/repos/asf/juddi/blob/2f5a2492/juddi-core/src/main/java/org/apache/juddi/query/FindBindingByCategoryQuery.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/query/FindBindingByCategoryQuery.java b/juddi-core/src/main/java/org/apache/juddi/query/FindBindingByCategoryQuery.java
index 6489785..2e34d97 100644
--- a/juddi-core/src/main/java/org/apache/juddi/query/FindBindingByCategoryQuery.java
+++ b/juddi-core/src/main/java/org/apache/juddi/query/FindBindingByCategoryQuery.java
@@ -52,7 +52,7 @@ public class FindBindingByCategoryQuery {
 												  BindingTemplateQuery.SIGNATURE_PRESENT);
 	}
 	
-	public static List<?> select(EntityManager em, FindQualifiers fq, CategoryBag categoryBag, String parentKey, List<?> keysIn) {
+	public static List<Object> select(EntityManager em, FindQualifiers fq, CategoryBag categoryBag, String parentKey, List<Object> keysIn) {
 		if (parentKey != null && parentKey.length() > 0) {
 			DynamicQuery.Parameter param = new DynamicQuery.Parameter(BindingTemplateQuery.ENTITY_ALIAS + "." + BindingTemplateQuery.KEY_NAME_PARENT, parentKey, DynamicQuery.PREDICATE_EQUALS); 
 			return findQuery.select(em, fq, categoryBag, keysIn, param);

http://git-wip-us.apache.org/repos/asf/juddi/blob/2f5a2492/juddi-core/src/main/java/org/apache/juddi/query/FindBindingByTModelKeyQuery.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/query/FindBindingByTModelKeyQuery.java b/juddi-core/src/main/java/org/apache/juddi/query/FindBindingByTModelKeyQuery.java
index 7f7dfc5..80d2df3 100644
--- a/juddi-core/src/main/java/org/apache/juddi/query/FindBindingByTModelKeyQuery.java
+++ b/juddi-core/src/main/java/org/apache/juddi/query/FindBindingByTModelKeyQuery.java
@@ -60,11 +60,11 @@ public class FindBindingByTModelKeyQuery extends BindingTemplateQuery {
 		entityAliasChild = buildAlias(ENTITY_NAME_CHILD);
 	}
 
-	public static List<?> select(EntityManager em, FindQualifiers fq, TModelBag tModels, String parentKey, 
-			List<?> keysIn, DynamicQuery.Parameter... restrictions) {
+	public static List<Object> select(EntityManager em, FindQualifiers fq, TModelBag tModels, String parentKey, 
+			List<Object> keysIn, DynamicQuery.Parameter... restrictions) {
 		// If keysIn is not null and empty, then search is over.
-		if ((keysIn != null) && (keysIn.size() == 0))
-			return keysIn;
+		//if ((keysIn != null) && (keysIn.size() == 0))
+		//	return keysIn;
 		
 		if (tModels == null)
 			return keysIn;

http://git-wip-us.apache.org/repos/asf/juddi/blob/2f5a2492/juddi-core/src/main/java/org/apache/juddi/query/FindBusinessByCategoryGroupQuery.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/query/FindBusinessByCategoryGroupQuery.java b/juddi-core/src/main/java/org/apache/juddi/query/FindBusinessByCategoryGroupQuery.java
index 790c127..dfc628b 100644
--- a/juddi-core/src/main/java/org/apache/juddi/query/FindBusinessByCategoryGroupQuery.java
+++ b/juddi-core/src/main/java/org/apache/juddi/query/FindBusinessByCategoryGroupQuery.java
@@ -57,7 +57,7 @@ public class FindBusinessByCategoryGroupQuery {
 													   BusinessEntityQuery.SIGNATURE_PRESENT);
 	}
 	
-	public static List<?> select(EntityManager em, FindQualifiers fq, CategoryBag categoryBag, List<?> keysIn) {
+	public static List<Object> select(EntityManager em, FindQualifiers fq, CategoryBag categoryBag, List<Object> keysIn) {
 		return findQuery.select(em, fq, categoryBag, keysIn);
 	}
 }

http://git-wip-us.apache.org/repos/asf/juddi/blob/2f5a2492/juddi-core/src/main/java/org/apache/juddi/query/FindBusinessByCategoryQuery.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/query/FindBusinessByCategoryQuery.java b/juddi-core/src/main/java/org/apache/juddi/query/FindBusinessByCategoryQuery.java
index 8c86a9d..cecb339 100644
--- a/juddi-core/src/main/java/org/apache/juddi/query/FindBusinessByCategoryQuery.java
+++ b/juddi-core/src/main/java/org/apache/juddi/query/FindBusinessByCategoryQuery.java
@@ -51,7 +51,7 @@ public class FindBusinessByCategoryQuery {
 												  BusinessEntityQuery.SIGNATURE_PRESENT);
 	}
 	
-	public static List<?> select(EntityManager em, FindQualifiers fq, CategoryBag categoryBag, List<?> keysIn) {
+	public static List<Object> select(EntityManager em, FindQualifiers fq, CategoryBag categoryBag, List<Object> keysIn) {
 		return findQuery.select(em, fq, categoryBag, keysIn);
 	}
 }

http://git-wip-us.apache.org/repos/asf/juddi/blob/2f5a2492/juddi-core/src/main/java/org/apache/juddi/query/FindBusinessByCombinedCategoryQuery.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/query/FindBusinessByCombinedCategoryQuery.java b/juddi-core/src/main/java/org/apache/juddi/query/FindBusinessByCombinedCategoryQuery.java
index 28427f3..3949963 100644
--- a/juddi-core/src/main/java/org/apache/juddi/query/FindBusinessByCombinedCategoryQuery.java
+++ b/juddi-core/src/main/java/org/apache/juddi/query/FindBusinessByCombinedCategoryQuery.java
@@ -71,7 +71,7 @@ public class FindBusinessByCombinedCategoryQuery {
                             BusinessEntityQuery.SIGNATURE_PRESENT);
         }
         
-        public static List<?> select(EntityManager em, FindQualifiers fq, CategoryBag categoryBag, List<?> keysIn) {
+        public static List<Object> select(EntityManager em, FindQualifiers fq, CategoryBag categoryBag, List<Object> keysIn) {
                 return findQuery.select(em, fq, categoryBag, keysIn);
         }
 }

http://git-wip-us.apache.org/repos/asf/juddi/blob/2f5a2492/juddi-core/src/main/java/org/apache/juddi/query/FindBusinessByDiscoveryURLQuery.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/query/FindBusinessByDiscoveryURLQuery.java b/juddi-core/src/main/java/org/apache/juddi/query/FindBusinessByDiscoveryURLQuery.java
index 0fbf493..b606ad4 100644
--- a/juddi-core/src/main/java/org/apache/juddi/query/FindBusinessByDiscoveryURLQuery.java
+++ b/juddi-core/src/main/java/org/apache/juddi/query/FindBusinessByDiscoveryURLQuery.java
@@ -54,8 +54,8 @@ public class FindBusinessByDiscoveryURLQuery extends BusinessEntityQuery {
 		entityAliasChild = buildAlias(ENTITY_NAME_CHILD);
 	}
 
-	public static List<?> select(EntityManager em, FindQualifiers fq, DiscoveryURLs discURLs, 
-			List<?> keysIn, DynamicQuery.Parameter... restrictions) {
+	public static List<Object> select(EntityManager em, FindQualifiers fq, DiscoveryURLs discURLs, 
+			List<Object> keysIn, DynamicQuery.Parameter... restrictions) {
 		// If keysIn is not null and empty, then search is over.
 		if ((keysIn != null) && (keysIn.size() == 0))
 			return keysIn;

http://git-wip-us.apache.org/repos/asf/juddi/blob/2f5a2492/juddi-core/src/main/java/org/apache/juddi/query/FindBusinessByIdentifierQuery.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/query/FindBusinessByIdentifierQuery.java b/juddi-core/src/main/java/org/apache/juddi/query/FindBusinessByIdentifierQuery.java
index ae0bdf8..0c117f4 100644
--- a/juddi-core/src/main/java/org/apache/juddi/query/FindBusinessByIdentifierQuery.java
+++ b/juddi-core/src/main/java/org/apache/juddi/query/FindBusinessByIdentifierQuery.java
@@ -50,7 +50,7 @@ public class FindBusinessByIdentifierQuery {
 													BusinessEntityQuery.SIGNATURE_PRESENT);
 	}
 	
-	public static List<?> select(EntityManager em, FindQualifiers fq, IdentifierBag identifiers, List<?> keysIn) {
+	public static List<Object> select(EntityManager em, FindQualifiers fq, IdentifierBag identifiers, List<Object> keysIn) {
 		return findQuery.select(em, fq, identifiers, keysIn);
 	}
 	

http://git-wip-us.apache.org/repos/asf/juddi/blob/2f5a2492/juddi-core/src/main/java/org/apache/juddi/query/FindBusinessByNameQuery.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/query/FindBusinessByNameQuery.java b/juddi-core/src/main/java/org/apache/juddi/query/FindBusinessByNameQuery.java
index 06568fc..b2a185a 100644
--- a/juddi-core/src/main/java/org/apache/juddi/query/FindBusinessByNameQuery.java
+++ b/juddi-core/src/main/java/org/apache/juddi/query/FindBusinessByNameQuery.java
@@ -58,7 +58,7 @@ public class FindBusinessByNameQuery {
 											   BusinessEntityQuery.SIGNATURE_PRESENT);
 	}
 
-	public static List<?> select(EntityManager em, FindQualifiers fq, List<Name> names, List<?> keysIn) {
+	public static List<Object> select(EntityManager em, FindQualifiers fq, List<Name> names, List<Object> keysIn) {
 		return findQuery.select(em, fq, names, keysIn);
 	}
 	

http://git-wip-us.apache.org/repos/asf/juddi/blob/2f5a2492/juddi-core/src/main/java/org/apache/juddi/query/FindBusinessByTModelKeyQuery.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/query/FindBusinessByTModelKeyQuery.java b/juddi-core/src/main/java/org/apache/juddi/query/FindBusinessByTModelKeyQuery.java
index 88da9c1..bde5d2b 100644
--- a/juddi-core/src/main/java/org/apache/juddi/query/FindBusinessByTModelKeyQuery.java
+++ b/juddi-core/src/main/java/org/apache/juddi/query/FindBusinessByTModelKeyQuery.java
@@ -60,7 +60,7 @@ public class FindBusinessByTModelKeyQuery extends BusinessEntityQuery {
 		entityAliasChild = buildAlias(ENTITY_NAME_CHILD);
 	}
 
-	public static List<?> select(EntityManager em, FindQualifiers fq, TModelBag tModels, List<?> keysIn, DynamicQuery.Parameter... restrictions) {
+	public static List<Object> select(EntityManager em, FindQualifiers fq, TModelBag tModels, List<Object> keysIn, DynamicQuery.Parameter... restrictions) {
 		// If keysIn is not null and empty, then search is over.
 		if ((keysIn != null) && (keysIn.isEmpty()))
 			return keysIn;

http://git-wip-us.apache.org/repos/asf/juddi/blob/2f5a2492/juddi-core/src/main/java/org/apache/juddi/query/FindEntityByCategoryGroupQuery.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/query/FindEntityByCategoryGroupQuery.java b/juddi-core/src/main/java/org/apache/juddi/query/FindEntityByCategoryGroupQuery.java
index fe55a46..178e5f3 100644
--- a/juddi-core/src/main/java/org/apache/juddi/query/FindEntityByCategoryGroupQuery.java
+++ b/juddi-core/src/main/java/org/apache/juddi/query/FindEntityByCategoryGroupQuery.java
@@ -128,7 +128,7 @@ public class FindEntityByCategoryGroupQuery extends EntityQuery {
 	}
 	
 	@SuppressWarnings("unchecked")
-	public List<?> select(EntityManager em, FindQualifiers fq, CategoryBag categoryBag, List<?> keysIn, DynamicQuery.Parameter... restrictions) {
+	public List<Object> select(EntityManager em, FindQualifiers fq, CategoryBag categoryBag, List<Object> keysIn, DynamicQuery.Parameter... restrictions) {
 		// If keysIn is not null and empty, then search is over.
 		if ((keysIn != null) && (keysIn.size() == 0))
 			return keysIn;
@@ -152,9 +152,9 @@ public class FindEntityByCategoryGroupQuery extends EntityQuery {
 		Collections.sort(keyedRefGroups, new KeyedRefGroupTModelComparator());
 		int count = 0;
 		String prevTModelKey = null;
-		Set<String> orResults = new HashSet<String>(0);
-		List<?> restrictionList = keysIn;
-		List<?> curResult = null;
+		Set<Object> orResults = new HashSet<Object>(0);
+		List<Object> restrictionList = keysIn;
+		List<Object> curResult = null;
 		for (KeyedReferenceGroup keyedRefGroup : keyedRefGroups) {
 			String curTModelKey = keyedRefGroup.getTModelKey();
 			
@@ -167,7 +167,7 @@ public class FindEntityByCategoryGroupQuery extends EntityQuery {
 			if (fq.isOrLikeKeys()) {
 				if (!curTModelKey.equals(prevTModelKey)) {
 					if (count != 0) {
-						restrictionList = new ArrayList<String>(orResults);
+						restrictionList = new ArrayList<Object>(orResults);
 						orResults.clear();
 					}
 				}
@@ -183,20 +183,20 @@ public class FindEntityByCategoryGroupQuery extends EntityQuery {
 			curResult = getQueryResult(em, dynamicQry, restrictionList, entityAlias + "." + keyName);
 
 			if (fq.isOrAllKeys() || fq.isOrLikeKeys()) {
-				orResults.addAll((List<String>)curResult);
+				orResults.addAll((List<Object>)curResult);
 			}
 			
 			prevTModelKey = curTModelKey;
 			count++;
 		}
 		
-		List<String> result = null;
+		List<Object> result = null;
 		if (fq.isOrAllKeys() || fq.isOrLikeKeys()) {
-			result = new ArrayList<String>(0);
+			result = new ArrayList<Object>(0);
 			result.addAll(orResults);
 		}
 		else
-			result = (List<String>)curResult;
+			result = (List<Object>)curResult;
 		
 		return result;
 		

http://git-wip-us.apache.org/repos/asf/juddi/blob/2f5a2492/juddi-core/src/main/java/org/apache/juddi/query/FindEntityByCategoryQuery.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/query/FindEntityByCategoryQuery.java b/juddi-core/src/main/java/org/apache/juddi/query/FindEntityByCategoryQuery.java
index 99d831a..0f7910e 100644
--- a/juddi-core/src/main/java/org/apache/juddi/query/FindEntityByCategoryQuery.java
+++ b/juddi-core/src/main/java/org/apache/juddi/query/FindEntityByCategoryQuery.java
@@ -117,7 +117,7 @@ public class FindEntityByCategoryQuery extends EntityQuery {
 		this.signaturePresent = signaturePresent;
 	}
 	
-	public List<?> select(EntityManager em, FindQualifiers fq, CategoryBag categoryBag, List<?> keysIn, DynamicQuery.Parameter... restrictions) {
+	public List<Object> select(EntityManager em, FindQualifiers fq, CategoryBag categoryBag, List<Object> keysIn, DynamicQuery.Parameter... restrictions) {
 		// If keysIn is not null and empty, then search is over.
 		if ((keysIn != null) && (keysIn.size() == 0))
 			return keysIn;

http://git-wip-us.apache.org/repos/asf/juddi/blob/2f5a2492/juddi-core/src/main/java/org/apache/juddi/query/FindEntityByCombinedCategoryQuery.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/query/FindEntityByCombinedCategoryQuery.java b/juddi-core/src/main/java/org/apache/juddi/query/FindEntityByCombinedCategoryQuery.java
index a19f737..acb62dc 100644
--- a/juddi-core/src/main/java/org/apache/juddi/query/FindEntityByCombinedCategoryQuery.java
+++ b/juddi-core/src/main/java/org/apache/juddi/query/FindEntityByCombinedCategoryQuery.java
@@ -126,8 +126,8 @@ public class FindEntityByCombinedCategoryQuery extends FindEntityByCategoryQuery
 		return entityAliasChild3;
 	}
 		
-	public List<?> select(EntityManager em, FindQualifiers fq, CategoryBag categoryBag, 
-			List<?> keysIn, DynamicQuery.Parameter... restrictions) {
+	public List<Object> select(EntityManager em, FindQualifiers fq, CategoryBag categoryBag, 
+			List<Object> keysIn, DynamicQuery.Parameter... restrictions) {
 	        
         // If keysIn is not null and empty, then search is over.
 		if ((keysIn != null) && (keysIn.size() == 0))
@@ -195,7 +195,7 @@ public class FindEntityByCombinedCategoryQuery extends FindEntityByCategoryQuery
 				}
 			}
 		}
-		return new ArrayList<String>(resultingEntityKeys);
+		return new ArrayList<Object>(resultingEntityKeys);
 	}
 	/**
 	 * Finding the entities (businesses or services) that have a matching keyedReference in their
@@ -212,7 +212,7 @@ public class FindEntityByCombinedCategoryQuery extends FindEntityByCategoryQuery
 	 */
 	private void findEntityByCategoryQuery(Map<KeyedReference,Set<String>> map, EntityManager em, 
 			FindQualifiers fq, CategoryBag categoryBag, String entityField, String entityNameChild, 
-			List<?> keysIn, DynamicQuery.Parameter... restrictions) 
+			List<Object> keysIn, DynamicQuery.Parameter... restrictions) 
 	{
 		FindEntityByCategoryQuery findEntityByCategoryQuery = new FindEntityByCategoryQuery(
 				entityName, entityAlias, keyName, entityField, entityNameChild, signaturePresent);

http://git-wip-us.apache.org/repos/asf/juddi/blob/2f5a2492/juddi-core/src/main/java/org/apache/juddi/query/FindEntityByIdentifierQuery.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/query/FindEntityByIdentifierQuery.java b/juddi-core/src/main/java/org/apache/juddi/query/FindEntityByIdentifierQuery.java
index 31251e2..d520b33 100644
--- a/juddi-core/src/main/java/org/apache/juddi/query/FindEntityByIdentifierQuery.java
+++ b/juddi-core/src/main/java/org/apache/juddi/query/FindEntityByIdentifierQuery.java
@@ -113,7 +113,7 @@ public class FindEntityByIdentifierQuery extends EntityQuery {
 	}
 
 	
-	public List<?> select(EntityManager em, FindQualifiers fq, IdentifierBag identifiers, List<?> keysIn, DynamicQuery.Parameter... restrictions) {
+	public List<Object> select(EntityManager em, FindQualifiers fq, IdentifierBag identifiers, List<Object> keysIn, DynamicQuery.Parameter... restrictions) {
 		// If keysIn is not null and empty, then search is over.
 		if ((keysIn != null) && (keysIn.size() == 0))
 			return keysIn;

http://git-wip-us.apache.org/repos/asf/juddi/blob/2f5a2492/juddi-core/src/main/java/org/apache/juddi/query/FindEntityByNamesQuery.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/query/FindEntityByNamesQuery.java b/juddi-core/src/main/java/org/apache/juddi/query/FindEntityByNamesQuery.java
index 5915783..ba1c3bf 100644
--- a/juddi-core/src/main/java/org/apache/juddi/query/FindEntityByNamesQuery.java
+++ b/juddi-core/src/main/java/org/apache/juddi/query/FindEntityByNamesQuery.java
@@ -99,7 +99,7 @@ public class FindEntityByNamesQuery extends EntityQuery {
 		this.signaturePresent = signaturePresent;
 	}
 	
-	public List<?> select(EntityManager em, FindQualifiers fq, List<Name> names, List<?> keysIn, DynamicQuery.Parameter... restrictions) {
+	public List<Object> select(EntityManager em, FindQualifiers fq, List<Name> names, List<Object> keysIn, DynamicQuery.Parameter... restrictions) {
 		// If keysIn is not null and empty, then search is over.
 		if ((keysIn != null) && (keysIn.size() == 0))
 			return keysIn;

http://git-wip-us.apache.org/repos/asf/juddi/blob/2f5a2492/juddi-core/src/main/java/org/apache/juddi/query/FindServiceByCategoryGroupQuery.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/query/FindServiceByCategoryGroupQuery.java b/juddi-core/src/main/java/org/apache/juddi/query/FindServiceByCategoryGroupQuery.java
index acbc2b4..688f70a 100644
--- a/juddi-core/src/main/java/org/apache/juddi/query/FindServiceByCategoryGroupQuery.java
+++ b/juddi-core/src/main/java/org/apache/juddi/query/FindServiceByCategoryGroupQuery.java
@@ -57,7 +57,7 @@ public class FindServiceByCategoryGroupQuery {
 													   BusinessServiceQuery.SIGNATURE_PRESENT);
 	}
 	
-	public static List<?> select(EntityManager em, FindQualifiers fq, CategoryBag categoryBag, String parentKey, List<?> keysIn) {
+	public static List<Object> select(EntityManager em, FindQualifiers fq, CategoryBag categoryBag, String parentKey, List<Object> keysIn) {
 		if (parentKey != null && parentKey.length() > 0) {
 			DynamicQuery.Parameter param = new DynamicQuery.Parameter(BusinessServiceQuery.ENTITY_ALIAS + "." + BusinessServiceQuery.KEY_NAME_PARENT, parentKey, DynamicQuery.PREDICATE_EQUALS); 
 			return findQuery.select(em, fq, categoryBag, keysIn, param);

http://git-wip-us.apache.org/repos/asf/juddi/blob/2f5a2492/juddi-core/src/main/java/org/apache/juddi/query/FindServiceByCategoryQuery.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/query/FindServiceByCategoryQuery.java b/juddi-core/src/main/java/org/apache/juddi/query/FindServiceByCategoryQuery.java
index bbdb1d3..978e5c7 100644
--- a/juddi-core/src/main/java/org/apache/juddi/query/FindServiceByCategoryQuery.java
+++ b/juddi-core/src/main/java/org/apache/juddi/query/FindServiceByCategoryQuery.java
@@ -51,7 +51,7 @@ public class FindServiceByCategoryQuery {
 												  BusinessServiceQuery.SIGNATURE_PRESENT);
 	}
 	
-	public static List<?> select(EntityManager em, FindQualifiers fq, CategoryBag categoryBag, String parentKey, List<?> keysIn) {
+	public static List<Object> select(EntityManager em, FindQualifiers fq, CategoryBag categoryBag, String parentKey, List<Object> keysIn) {
 		if (parentKey != null && parentKey.length() > 0) {
 			DynamicQuery.Parameter param = new DynamicQuery.Parameter(BusinessServiceQuery.ENTITY_ALIAS + "." 
 					+ BusinessServiceQuery.KEY_NAME_PARENT, parentKey, DynamicQuery.PREDICATE_EQUALS); 

http://git-wip-us.apache.org/repos/asf/juddi/blob/2f5a2492/juddi-core/src/main/java/org/apache/juddi/query/FindServiceByCombinedCategoryQuery.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/query/FindServiceByCombinedCategoryQuery.java b/juddi-core/src/main/java/org/apache/juddi/query/FindServiceByCombinedCategoryQuery.java
index ab87a9d..3716bf4 100644
--- a/juddi-core/src/main/java/org/apache/juddi/query/FindServiceByCombinedCategoryQuery.java
+++ b/juddi-core/src/main/java/org/apache/juddi/query/FindServiceByCombinedCategoryQuery.java
@@ -76,7 +76,7 @@ public class FindServiceByCombinedCategoryQuery {
 														  BusinessServiceQuery.SIGNATURE_PRESENT);
 	}
 	
-	public static List<?> select(EntityManager em, FindQualifiers fq, CategoryBag categoryBag, String parentKey, List<?> keysIn) {
+	public static List<Object> select(EntityManager em, FindQualifiers fq, CategoryBag categoryBag, String parentKey, List<Object> keysIn) {
 		if (parentKey != null && parentKey.length() > 0) {
 			DynamicQuery.Parameter param = new DynamicQuery.Parameter(BusinessServiceQuery.ENTITY_ALIAS + "." + BusinessServiceQuery.KEY_NAME_PARENT, parentKey, DynamicQuery.PREDICATE_EQUALS); 
 			return findQuery.select(em, fq, categoryBag, keysIn, param);

http://git-wip-us.apache.org/repos/asf/juddi/blob/2f5a2492/juddi-core/src/main/java/org/apache/juddi/query/FindServiceByNameQuery.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/query/FindServiceByNameQuery.java b/juddi-core/src/main/java/org/apache/juddi/query/FindServiceByNameQuery.java
index bb52bec..e6f1e94 100644
--- a/juddi-core/src/main/java/org/apache/juddi/query/FindServiceByNameQuery.java
+++ b/juddi-core/src/main/java/org/apache/juddi/query/FindServiceByNameQuery.java
@@ -58,7 +58,7 @@ public class FindServiceByNameQuery {
 											   BusinessServiceQuery.SIGNATURE_PRESENT);
 	}
 
-	public static List<?> select(EntityManager em, FindQualifiers fq, List<Name> names, String parentKey, List<?> keysIn) {
+	public static List<Object> select(EntityManager em, FindQualifiers fq, List<Name> names, String parentKey, List<Object> keysIn) {
 		if (parentKey != null && parentKey.length() > 0) {
 			DynamicQuery.Parameter param = new DynamicQuery.Parameter(BusinessServiceQuery.ENTITY_ALIAS + "." + BusinessServiceQuery.KEY_NAME_PARENT, parentKey, DynamicQuery.PREDICATE_EQUALS); 
 			return findQuery.select(em, fq, names, keysIn, param);

http://git-wip-us.apache.org/repos/asf/juddi/blob/2f5a2492/juddi-core/src/main/java/org/apache/juddi/query/FindServiceByTModelKeyQuery.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/query/FindServiceByTModelKeyQuery.java b/juddi-core/src/main/java/org/apache/juddi/query/FindServiceByTModelKeyQuery.java
index 5c855f9..991230e 100644
--- a/juddi-core/src/main/java/org/apache/juddi/query/FindServiceByTModelKeyQuery.java
+++ b/juddi-core/src/main/java/org/apache/juddi/query/FindServiceByTModelKeyQuery.java
@@ -62,7 +62,7 @@ public class FindServiceByTModelKeyQuery extends BusinessServiceQuery {
 		entityAliasChild = buildAlias(ENTITY_NAME_CHILD);
 	}
 
-	public static List<?> select(EntityManager em, FindQualifiers fq, TModelBag tModels, String parentKey, List<?> keysIn, DynamicQuery.Parameter... restrictions) {
+	public static List<Object> select(EntityManager em, FindQualifiers fq, TModelBag tModels, String parentKey, List<Object> keysIn, DynamicQuery.Parameter... restrictions) {
 		// If keysIn is not null and empty, then search is over.
 		if ((keysIn != null) && (keysIn.isEmpty()))
 			return keysIn;

http://git-wip-us.apache.org/repos/asf/juddi/blob/2f5a2492/juddi-core/src/main/java/org/apache/juddi/query/FindTModelByCategoryGroupQuery.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/query/FindTModelByCategoryGroupQuery.java b/juddi-core/src/main/java/org/apache/juddi/query/FindTModelByCategoryGroupQuery.java
index 487a90e..29750df 100644
--- a/juddi-core/src/main/java/org/apache/juddi/query/FindTModelByCategoryGroupQuery.java
+++ b/juddi-core/src/main/java/org/apache/juddi/query/FindTModelByCategoryGroupQuery.java
@@ -58,7 +58,7 @@ public class FindTModelByCategoryGroupQuery {
 													   TModelQuery.SIGNATURE_PRESENT);
 	}
 	
-	public static List<?> select(EntityManager em, FindQualifiers fq, CategoryBag categoryBag, List<?> keysIn) {
+	public static List<Object> select(EntityManager em, FindQualifiers fq, CategoryBag categoryBag, List<Object> keysIn) {
 		return findQuery.select(em, fq, categoryBag, keysIn,  new DynamicQuery.Parameter(TModelQuery.ENTITY_ALIAS 
 				+ ".deleted", Boolean.FALSE, DynamicQuery.PREDICATE_EQUALS));
 	}

http://git-wip-us.apache.org/repos/asf/juddi/blob/2f5a2492/juddi-core/src/main/java/org/apache/juddi/query/FindTModelByCategoryQuery.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/query/FindTModelByCategoryQuery.java b/juddi-core/src/main/java/org/apache/juddi/query/FindTModelByCategoryQuery.java
index 6e5237c..edf0bd6 100644
--- a/juddi-core/src/main/java/org/apache/juddi/query/FindTModelByCategoryQuery.java
+++ b/juddi-core/src/main/java/org/apache/juddi/query/FindTModelByCategoryQuery.java
@@ -52,7 +52,7 @@ public class FindTModelByCategoryQuery {
 												  TModelQuery.SIGNATURE_PRESENT);
 	}
 	
-	public static List<?> select(EntityManager em, FindQualifiers fq, CategoryBag categoryBag, List<?> keysIn) {
+	public static List<Object> select(EntityManager em, FindQualifiers fq, CategoryBag categoryBag, List<Object> keysIn) {
 		return findQuery.select(em, fq, categoryBag, keysIn, new DynamicQuery.Parameter(TModelQuery.ENTITY_ALIAS 
 				+ ".deleted", Boolean.FALSE, DynamicQuery.PREDICATE_EQUALS));
 	}

http://git-wip-us.apache.org/repos/asf/juddi/blob/2f5a2492/juddi-core/src/main/java/org/apache/juddi/query/FindTModelByIdentifierQuery.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/query/FindTModelByIdentifierQuery.java b/juddi-core/src/main/java/org/apache/juddi/query/FindTModelByIdentifierQuery.java
index fe7d53a..3c13cfc 100644
--- a/juddi-core/src/main/java/org/apache/juddi/query/FindTModelByIdentifierQuery.java
+++ b/juddi-core/src/main/java/org/apache/juddi/query/FindTModelByIdentifierQuery.java
@@ -51,7 +51,7 @@ public class FindTModelByIdentifierQuery {
 													TModelQuery.SIGNATURE_PRESENT);
 	}
 	
-	public static List<?> select(EntityManager em, FindQualifiers fq, IdentifierBag identifiers, List<?> keysIn) {
+	public static List<Object> select(EntityManager em, FindQualifiers fq, IdentifierBag identifiers, List<Object> keysIn) {
 		return findQuery.select(em, fq, identifiers, keysIn, new DynamicQuery.Parameter(TModelQuery.ENTITY_ALIAS + ".deleted", Boolean.FALSE, DynamicQuery.PREDICATE_EQUALS));
 	}
 	

http://git-wip-us.apache.org/repos/asf/juddi/blob/2f5a2492/juddi-core/src/main/java/org/apache/juddi/query/FindTModelByNameQuery.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/query/FindTModelByNameQuery.java b/juddi-core/src/main/java/org/apache/juddi/query/FindTModelByNameQuery.java
index bb64b81..40bfb2d 100644
--- a/juddi-core/src/main/java/org/apache/juddi/query/FindTModelByNameQuery.java
+++ b/juddi-core/src/main/java/org/apache/juddi/query/FindTModelByNameQuery.java
@@ -51,7 +51,7 @@ public class FindTModelByNameQuery extends TModelQuery {
 	@SuppressWarnings("unused")
 	private static Log log = LogFactory.getLog(FindTModelByNameQuery.class);
 
-	public static List<?> select(EntityManager em, FindQualifiers fq, Name name, List<?> keysIn, DynamicQuery.Parameter... restrictions) {
+	public static List<Object> select(EntityManager em, FindQualifiers fq, Name name, List<Object> keysIn, DynamicQuery.Parameter... restrictions) {
 		// If keysIn is not null and empty, then search is over.
 		if ((keysIn != null) && (keysIn.isEmpty()))
 			return keysIn;

http://git-wip-us.apache.org/repos/asf/juddi/blob/2f5a2492/juddi-core/src/main/java/org/apache/juddi/validation/ValidateInquiry.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/main/java/org/apache/juddi/validation/ValidateInquiry.java b/juddi-core/src/main/java/org/apache/juddi/validation/ValidateInquiry.java
index e5c276d..37d6ae0 100644
--- a/juddi-core/src/main/java/org/apache/juddi/validation/ValidateInquiry.java
+++ b/juddi-core/src/main/java/org/apache/juddi/validation/ValidateInquiry.java
@@ -21,6 +21,13 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.Hashtable;
 import java.util.Map;
+import javax.persistence.EntityManager;
+import javax.persistence.EntityTransaction;
+import org.apache.juddi.api.impl.InquiryHelper;
+import org.apache.juddi.api.util.InquiryQuery;
+import org.apache.juddi.api.util.QueryStatus;
+import org.apache.juddi.config.PersistenceManager;
+import org.apache.juddi.mapping.MappingModelToApi;
 
 import org.uddi.api_v3.GetBusinessDetail;
 import org.uddi.api_v3.GetOperationalInfo;
@@ -40,6 +47,8 @@ import org.uddi.api_v3.TModelBag;
 import org.uddi.v3_service.DispositionReportFaultMessage;
 
 import org.apache.juddi.model.UddiEntityPublisher;
+import org.apache.juddi.query.BusinessServiceQuery;
+import org.apache.juddi.query.util.DynamicQuery;
 import org.apache.juddi.query.util.FindQualifiers;
 import org.apache.juddi.v3.error.ErrorMessage;
 import org.apache.juddi.v3.error.FatalErrorException;
@@ -47,6 +56,8 @@ import org.apache.juddi.v3.error.InvalidCombinationException;
 import org.apache.juddi.v3.error.InvalidKeyPassedException;
 import org.apache.juddi.v3.error.UnsupportedException;
 import org.apache.juddi.v3.error.ValueNotAllowedException;
+import org.uddi.api_v3.BindingDetail;
+import org.uddi.api_v3.ServiceDetail;
 
 /**
  * @author <a href="mailto:jfaath@apache.org">Jeff Faath</a>
@@ -256,8 +267,10 @@ public class ValidateInquiry extends ValidateUDDIApi {
                 if (body == null) {
                         throw new FatalErrorException(new ErrorMessage("errors.NullInput"));
                 }
-
-                if (body.getCategoryBag() == null && body.getFindTModel() == null && body.getTModelBag() == null) {
+                if (body.getServiceKey()!=null && body.getServiceKey().length() > 0) {
+                    validateServiceExists(body.getServiceKey());
+                }
+                if ((body.getServiceKey()==null || body.getServiceKey().length()==0) && body.getCategoryBag() == null && body.getFindTModel() == null && body.getTModelBag() == null) {
                         throw new FatalErrorException(new ErrorMessage("errors.findbinding.NoInput"));
                 }
 
@@ -760,4 +773,30 @@ public class ValidateInquiry extends ValidateUDDIApi {
                 supportedFindqualifiers.put(FindQualifiers.UTS_10_TMODEL.toLowerCase(), true);
                 
         }
+
+    private void validateServiceExists(String serviceKey) throws InvalidKeyPassedException {
+        
+        EntityManager em = PersistenceManager.getEntityManager();
+        EntityTransaction tx = em.getTransaction();
+        try {
+            tx.begin();
+
+            org.apache.juddi.model.BusinessService modelBusinessService = null;
+            try {
+                modelBusinessService = em.find(org.apache.juddi.model.BusinessService.class, serviceKey);
+            } catch (ClassCastException e) {
+            }
+            if (modelBusinessService == null) {
+                throw new InvalidKeyPassedException(new ErrorMessage("errors.invalidkey.ServiceNotFound", serviceKey));
+            }
+
+            tx.commit();
+
+        } finally {
+            if (tx.isActive()) {
+                tx.rollback();
+            }
+            em.close();
+        }
+    }
 }

http://git-wip-us.apache.org/repos/asf/juddi/blob/2f5a2492/juddi-core/src/test/java/org/apache/juddi/api/impl/API_070_FindEntityTest.java
----------------------------------------------------------------------
diff --git a/juddi-core/src/test/java/org/apache/juddi/api/impl/API_070_FindEntityTest.java b/juddi-core/src/test/java/org/apache/juddi/api/impl/API_070_FindEntityTest.java
index c4beb0c..ddf0418 100644
--- a/juddi-core/src/test/java/org/apache/juddi/api/impl/API_070_FindEntityTest.java
+++ b/juddi-core/src/test/java/org/apache/juddi/api/impl/API_070_FindEntityTest.java
@@ -15,6 +15,7 @@
 package org.apache.juddi.api.impl;
 
 import java.rmi.RemoteException;
+import java.util.List;
 
 import org.apache.commons.configuration.ConfigurationException;
 import org.apache.commons.logging.Log;
@@ -24,6 +25,8 @@ import org.apache.juddi.v3.client.UDDIConstants;
 import org.apache.juddi.v3.tck.TckBindingTemplate;
 import org.apache.juddi.v3.tck.TckBusiness;
 import org.apache.juddi.v3.tck.TckBusinessService;
+import static org.apache.juddi.v3.tck.TckBusinessService.JOE_SERVICE_KEY_2;
+import static org.apache.juddi.v3.tck.TckBusinessService.JOE_SERVICE_XML_2;
 import org.apache.juddi.v3.tck.TckFindEntity;
 import org.apache.juddi.v3.tck.TckPublisher;
 import org.apache.juddi.v3.tck.TckSecurity;
@@ -31,15 +34,18 @@ import org.apache.juddi.v3.tck.TckTModel;
 import org.junit.AfterClass;
 import org.junit.Assert;
 import org.junit.BeforeClass;
-import org.junit.Ignore;
 import org.junit.Test;
+import org.uddi.api_v3.BindingDetail;
+import org.uddi.api_v3.BindingTemplate;
 import org.uddi.api_v3.CategoryBag;
+import org.uddi.api_v3.FindBinding;
 import org.uddi.api_v3.FindQualifiers;
 import org.uddi.api_v3.FindTModel;
 import org.uddi.api_v3.KeyedReference;
 import org.uddi.api_v3.Name;
 import org.uddi.api_v3.SaveTModel;
 import org.uddi.api_v3.TModel;
+import org.uddi.api_v3.TModelBag;
 import org.uddi.api_v3.TModelList;
 
 /**
@@ -64,7 +70,8 @@ public class API_070_FindEntityTest {
                 Registry.start();
                 logger.debug("Getting auth token..");
                 try {
-                         tckTModel.saveUDDIPublisherTmodel(TckSecurity.getAuthToken(new UDDISecurityImpl(), TckPublisher.getUDDIPublisherId(), TckPublisher.getUDDIPassword()));
+                        tckTModel.saveUDDIPublisherTmodel(TckSecurity.getAuthToken(new UDDISecurityImpl(), TckPublisher.getUDDIPublisherId(), TckPublisher.getUDDIPassword()));
+                        tckTModel.saveTmodels(TckSecurity.getAuthToken(new UDDISecurityImpl(), TckPublisher.getUDDIPublisherId(), TckPublisher.getUDDIPassword()));
                         api010.saveJoePublisher();
                         authInfoJoe = TckSecurity.getAuthToken(new UDDISecurityImpl(), TckPublisher.getJoePublisherId(), TckPublisher.getJoePassword());
                 } catch (RemoteException e) {
@@ -210,7 +217,6 @@ public class API_070_FindEntityTest {
         public void JUDDI_899_2() throws Exception {
                 UDDIInquiryImpl inquiry = new UDDIInquiryImpl();
 
-                UDDIPublicationImpl pub = new UDDIPublicationImpl();
 
                 FindTModel ftm = new FindTModel();
                 ftm.setAuthInfo(authInfoJoe);
@@ -226,4 +232,83 @@ public class API_070_FindEntityTest {
                 Assert.assertNotNull(findTModel.getTModelInfos().getTModelInfo());
 
         }
+        
+        @Test
+        public void JUDDI_992() throws Exception {
+                try{
+                    
+                    tckTModel.saveJoePublisherTmodel(authInfoJoe);
+                    //save a business, service and bindings
+                    tckBusiness.saveJoePublisherBusiness(authInfoJoe);
+                    tckBusinessService. saveService(authInfoJoe, JOE_SERVICE_XML_2, JOE_SERVICE_KEY_2);
+                    
+                    UDDIInquiryImpl inquiry = new UDDIInquiryImpl();
+                    FindBinding body = new FindBinding();
+                    body.setServiceKey(TckBusinessService.JOE_SERVICE_KEY_2);
+                    body.setFindQualifiers(new FindQualifiers());
+			body.getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);
+                        body.getFindQualifiers().getFindQualifier().add(UDDIConstants.SORT_BY_DATE_ASC);
+			BindingDetail result = inquiry.findBinding(body);
+			if (result == null)
+				Assert.fail("Null result from find binding operation");
+			List<BindingTemplate> btList = result.getBindingTemplate();
+			if (btList == null || btList.size() == 0)
+				Assert.fail("No result from find binding operation");
+			Assert.assertTrue(btList.size()==1);
+                        
+                }
+                finally {
+                    tckBusiness.deleteJoePublisherBusiness(authInfoJoe);
+                }
+        }
+        
+        /**
+         * find by binding by service key and category bag
+         * <pre>
+         * 
+         * &#x3C;find_binding xmlns=&#x22;urn:uddi-org:api_v2&#x22; xmlns:xml=&#x22;http://www.w3.org/XML/1998/namespace&#x22; serviceKey=&#x22;&#x22;&#x3E;
+            &#x3C;findQualifiers&#x3E;
+              &#x3C;findQualifier&#x3E;orAllKeys&#x3C;/findQualifier&#x3E;
+            &#x3C;/findQualifiers&#x3E;
+            &#x3C;tModelBag&#x3E;
+              &#x3C;tModelKey&#x3E;uddi:uddi.org:protocol:serverauthenticatedssl3&#x3C;/tModelKey&#x3E;
+            &#x3C;/tModelBag&#x3E;
+            &#x3C;categoryBag&#x3E;
+              &#x3C;keyedReference tModelKey=&#x22;uuid:f85a1fb1-2be1-4197-9a3f-fc310222cd34&#x22; keyName=&#x22;category&#x22; keyValue=&#x22;secure&#x22; /&#x3E;
+            &#x3C;/categoryBag&#x3E;
+          &#x3C;/find_binding&#x3E;
+         * </pre>
+         * @throws Exception 
+         */
+        @Test
+        public void JUDDI_992_2() throws Exception {
+                try{
+                    
+                    tckTModel.saveJoePublisherTmodel(authInfoJoe);
+                    //save a business, service and bindings
+                    tckBusiness.saveJoePublisherBusiness(authInfoJoe);
+                    tckBusinessService. saveService(authInfoJoe, JOE_SERVICE_XML_2, JOE_SERVICE_KEY_2);
+                    
+                    UDDIInquiryImpl inquiry = new UDDIInquiryImpl();
+                    FindBinding body = new FindBinding();
+                   // body.setServiceKey(TckBusinessService.JOE_SERVICE_KEY_2);
+                    body.setFindQualifiers(new FindQualifiers());
+                    body.getFindQualifiers().getFindQualifier().add(UDDIConstants.OR_ALL_KEYS);
+                    body.setTModelBag(new TModelBag());
+                    body.getTModelBag().getTModelKey().add("uddi:uddi.org:transport:telephone");
+                    body.setCategoryBag(new CategoryBag());
+                    body.getCategoryBag().getKeyedReference().add(new KeyedReference("uddi:tmodelkey:categories:bindings", "category", "accesspoint"));
+                    BindingDetail result = inquiry.findBinding(body);
+                    if (result == null)
+                            Assert.fail("Null result from find binding operation");
+                    List<BindingTemplate> btList = result.getBindingTemplate();
+                    if (btList == null || btList.size() == 0)
+                            Assert.fail("No result from find binding operation");
+                    Assert.assertTrue(btList.size()==1);
+                        
+                }
+                finally {
+                    tckBusiness.deleteJoePublisherBusiness(authInfoJoe);
+                }
+        }
 }

http://git-wip-us.apache.org/repos/asf/juddi/blob/2f5a2492/uddi-tck-base/src/main/java/org/apache/juddi/v2/tck/TckFindEntity.java
----------------------------------------------------------------------
diff --git a/uddi-tck-base/src/main/java/org/apache/juddi/v2/tck/TckFindEntity.java b/uddi-tck-base/src/main/java/org/apache/juddi/v2/tck/TckFindEntity.java
index 316a5d0..291c06f 100644
--- a/uddi-tck-base/src/main/java/org/apache/juddi/v2/tck/TckFindEntity.java
+++ b/uddi-tck-base/src/main/java/org/apache/juddi/v2/tck/TckFindEntity.java
@@ -229,7 +229,7 @@ public class TckFindEntity
 		String serviceKey = null;
 		try {
 			FindService body = (FindService)EntityCreator.buildFromDoc(FIND_SERVICE_XML, "org.uddi.api_v2");
-               body.setGeneric("2.0");
+                        body.setGeneric("2.0");
 			if (findQualifier!=null) body.getFindQualifiers().getFindQualifier().add(findQualifier);
 			ServiceList result = inquiry.findService(body);
 			if (result == null)
@@ -284,7 +284,7 @@ public class TckFindEntity
 	public void findServiceDetail(String serviceKey) {
 		try {
 			GetServiceDetail getServiceDetail = new GetServiceDetail();
-               getServiceDetail.setGeneric("2.0");
+                        getServiceDetail.setGeneric("2.0");
 			getServiceDetail.getServiceKey().add(serviceKey);
 			
 			
@@ -321,7 +321,7 @@ public class TckFindEntity
 		try {
 			FindBinding body = (FindBinding)EntityCreator.buildFromDoc(FIND_BINDING_XML, "org.uddi.api_v2");
 			if (findQualifier!=null) body.getFindQualifiers().getFindQualifier().add(findQualifier);
-               body.setGeneric("2.0");
+                        body.setGeneric("2.0");
 			BindingDetail result = inquiry.findBinding(body);
 			if (result == null)
 				Assert.fail("Null result from find binding operation");

http://git-wip-us.apache.org/repos/asf/juddi/blob/2f5a2492/uddi-tck-base/src/main/resources/uddi_data_v2/joepublisher/bindingTemplate.xml
----------------------------------------------------------------------
diff --git a/uddi-tck-base/src/main/resources/uddi_data_v2/joepublisher/bindingTemplate.xml b/uddi-tck-base/src/main/resources/uddi_data_v2/joepublisher/bindingTemplate.xml
index e207cc0..b3501fb 100644
--- a/uddi-tck-base/src/main/resources/uddi_data_v2/joepublisher/bindingTemplate.xml
+++ b/uddi-tck-base/src/main/resources/uddi_data_v2/joepublisher/bindingTemplate.xml
@@ -23,7 +23,7 @@
   </tModelInstanceDetails>
   <categoryBag>
     <keyedReference tModelKey="uuid:f85a1fb1-2be1-4197-9a3f-fc310222cd34" keyName="category" keyValue="secure" />
-    <keyedReference tModelKey="uddi:uddi.org:categorization:types"
-    	keyName="HTTP protocol" keyValue="uddi:uddi.org:protocol:http"/>
+    <!--<keyedReference tModelKey="uddi:uddi.org:categorization:types"
+    	keyName="HTTP protocol" keyValue="uddi:uddi.org:protocol:http"/>-->
   </categoryBag>
 </bindingTemplate>


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@juddi.apache.org
For additional commands, e-mail: commits-help@juddi.apache.org


Mime
View raw message