View Javadoc
1 /* 2 * $Header: /cvsroot/ebxmlrr/ebxmlrr/src/share/com/sun/ebxml/registry/query/filter/AuditableEventQueryProcessor.java,v 1.6 2003/01/14 22:22:35 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 AuditableEventQueryProcessor 14 * @see 15 * @author Nikola Stojanovic 16 */ 17 public class AuditableEventQueryProcessor extends RegistryObjectQueryProcessor { 18 19 private AuditableEventQuery auditableEventQuery = null; 20 21 22 protected String getName() { 23 24 return "AuditableEvent"; 25 } 26 27 28 protected void setNativeQuery(RegistryObjectQueryType query) { 29 30 auditableEventQuery = (AuditableEventQuery)query; 31 super.setNativeQuery((RegistryObjectQueryType)auditableEventQuery); 32 } 33 34 35 protected void buildFilterClauses() throws RegistryException { 36 37 convertAuditableEventFilter(); 38 super.buildFilterClauses(); 39 } 40 41 42 protected void buildQueryClauses() throws RegistryException { 43 44 convertRegistryObjectQuery(); 45 convertRegistryEntryQuery(); 46 super.buildQueryClauses(); 47 } 48 49 50 protected void buildBranchClauses() throws RegistryException { 51 52 convertUserBranch(); 53 super.buildBranchClauses(); 54 } 55 56 57 private void convertAuditableEventFilter() throws RegistryException { 58 59 if (auditableEventQuery.getAuditableEventFilter() != null) { 60 whereClause = filterProcessor.addNativeWhereClause(whereClause, auditableEventQuery.getAuditableEventFilter()); 61 } 62 } 63 64 65 private void convertRegistryObjectQuery() throws RegistryException { 66 67 if (auditableEventQuery.getRegistryObjectQuery() != null) { 68 RegistryObjectQueryProcessor queryProcessor = new RegistryObjectQueryProcessor(); 69 queryProcessor.setParentJoinColumn("registryObject"); 70 queryProcessor.setSelectColumn("id"); 71 whereClause = queryProcessor.addWhereClause(whereClause, auditableEventQuery.getRegistryObjectQuery()); 72 } 73 } 74 75 76 private void convertRegistryEntryQuery() throws RegistryException { 77 78 if (auditableEventQuery.getRegistryEntryQuery() != null) { 79 RegistryEntryQueryProcessor queryProcessor = new RegistryEntryQueryProcessor(); 80 queryProcessor.setParentJoinColumn("registryObject"); 81 queryProcessor.setSelectColumn("id"); 82 whereClause = queryProcessor.addWhereClause(whereClause, auditableEventQuery.getRegistryEntryQuery()); 83 } 84 } 85 86 87 private void convertUserBranch() throws RegistryException { 88 89 if (auditableEventQuery.getUserBranch() != null) { 90 UserBranchProcessor branchProcessor = new UserBranchProcessor(); 91 branchProcessor.setParentJoinColumn("user"); 92 branchProcessor.setSelectColumn("id"); 93 whereClause = branchProcessor.addWhereClause(whereClause, auditableEventQuery.getUserBranch()); 94 } 95 } 96 }

This page was automatically generated by Maven