View Javadoc
1 /* 2 * $Header: /cvsroot/ebxmlrr/ebxmlrr/src/share/com/sun/ebxml/registry/query/filter/ServiceQueryProcessor.java,v 1.6 2003/01/14 22:19:45 nstojano Exp $ 3 */ 4 5 package com.sun.ebxml.registry.query.filter; 6 7 import com.sun.ebxml.registry.*; 8 9 import org.oasis.ebxml.registry.bindings.query.*; 10 import org.oasis.ebxml.registry.bindings.rs.*; 11 12 /*** 13 * Class Declaration for ServiceQueryProcessor 14 * @see 15 * @author Nikola Stojanovic 16 */ 17 public class ServiceQueryProcessor extends RegistryEntryQueryProcessor { 18 19 private ServiceQuery serviceQuery = null; 20 21 22 protected String getName() { 23 24 return "Service"; 25 } 26 27 28 protected void setNativeQuery(RegistryObjectQueryType query) { 29 30 serviceQuery = (ServiceQuery)query; 31 super.setNativeQuery((RegistryObjectQueryType)serviceQuery); 32 } 33 34 35 protected void buildFilterClauses() throws RegistryException { 36 37 convertServiceFilter(); 38 super.buildFilterClauses(); 39 } 40 41 42 protected void buildQueryClauses() throws RegistryException { 43 44 super.buildQueryClauses(); 45 } 46 47 48 protected void buildBranchClauses() throws RegistryException { 49 50 convertServiceBindingBranches(); 51 super.buildBranchClauses(); 52 } 53 54 55 private void convertServiceFilter() throws RegistryException { 56 57 if (serviceQuery.getServiceFilter() != null) { 58 whereClause = filterProcessor.addNativeWhereClause(whereClause, serviceQuery.getServiceFilter()); 59 } 60 } 61 62 63 private void convertServiceBindingBranches() throws RegistryException { 64 65 ServiceBindingBranch[] serviceBindingBranch = serviceQuery.getServiceBindingBranch(); 66 67 if (serviceBindingBranch.length > 0) { 68 69 for (int i=0; i<serviceBindingBranch.length; i++) { 70 ServiceBindingBranchProcessor branchProcessor = new ServiceBindingBranchProcessor(); 71 branchProcessor.setSelectColumn("service"); 72 whereClause = branchProcessor.addWhereClause(whereClause, serviceBindingBranch[i]); 73 } 74 } 75 } 76 }

This page was automatically generated by Maven