View Javadoc
1 /* 2 * $Header: /cvsroot/ebxmlrr/ebxmlrr/src/share/com/sun/ebxml/registry/query/filter/ClassificationQueryProcessor.java,v 1.5 2002/03/06 04:40:40 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 ClassificationQueryProcessor 14 * @see 15 * @author Nikola Stojanovic 16 */ 17 public class ClassificationQueryProcessor extends RegistryObjectQueryProcessor { 18 19 private ClassificationQuery classificationQuery = null; 20 21 22 protected String getName() { 23 24 return "Classification"; 25 } 26 27 28 protected void setNativeQuery(RegistryObjectQueryType query) { 29 30 classificationQuery = (ClassificationQuery)query; 31 super.setNativeQuery((RegistryObjectQueryType)classificationQuery); 32 } 33 34 35 protected void buildFilterClauses() throws RegistryException { 36 37 convertClassificationFilter(); 38 super.buildFilterClauses(); 39 } 40 41 42 protected void buildQueryClauses() throws RegistryException { 43 44 convertClasificationSchemeQuery(); 45 convertClassificationNodeQuery(); 46 convertRegistryObjectQuery(); 47 convertRegistryEntryQuery(); 48 super.buildQueryClauses(); 49 } 50 51 52 protected void buildBranchClauses() throws RegistryException { 53 54 super.buildBranchClauses(); 55 } 56 57 58 private void convertClassificationFilter() throws RegistryException { 59 60 if (classificationQuery.getClassificationFilter() != null) { 61 whereClause = filterProcessor.addNativeWhereClause(whereClause, classificationQuery.getClassificationFilter()); 62 } 63 } 64 65 66 private void convertClasificationSchemeQuery() throws RegistryException { 67 68 if (classificationQuery.getClassificationSchemeQuery() != null) { 69 ClassificationSchemeQueryProcessor queryProcessor = new ClassificationSchemeQueryProcessor(); 70 queryProcessor.setParentJoinColumn("classificationScheme"); 71 queryProcessor.setSelectColumn("id"); 72 whereClause = queryProcessor.addWhereClause(whereClause, classificationQuery.getClassificationSchemeQuery()); 73 } 74 } 75 76 77 private void convertClassificationNodeQuery() throws RegistryException { 78 79 if (classificationQuery.getClassificationNodeQuery() != null) { 80 ClassificationNodeQueryProcessor queryProcessor = new ClassificationNodeQueryProcessor(); 81 queryProcessor.setParentJoinColumn("classificationNode"); 82 queryProcessor.setSelectColumn("id"); 83 whereClause = queryProcessor.addWhereClause(whereClause, classificationQuery.getClassificationNodeQuery()); 84 } 85 } 86 87 88 private void convertRegistryObjectQuery() throws RegistryException { 89 90 if (classificationQuery.getRegistryObjectQuery() != null) { 91 RegistryObjectQueryProcessor queryProcessor = new RegistryObjectQueryProcessor(); 92 queryProcessor.setParentJoinColumn("classifiedObject"); 93 queryProcessor.setSelectColumn("id"); 94 whereClause = queryProcessor.addWhereClause(whereClause, classificationQuery.getRegistryObjectQuery()); 95 } 96 } 97 98 99 private void convertRegistryEntryQuery() throws RegistryException { 100 101 if (classificationQuery.getRegistryEntryQuery() != null) { 102 RegistryEntryQueryProcessor queryProcessor = new RegistryEntryQueryProcessor(); 103 queryProcessor.setParentJoinColumn("classifiedObject"); 104 queryProcessor.setSelectColumn("id"); 105 whereClause = queryProcessor.addWhereClause(whereClause, classificationQuery.getRegistryEntryQuery()); 106 } 107 } 108 }

This page was automatically generated by Maven