// join against.
InitialContext ctx = new InitialContext();
Object oh = ctx.lookup("local/AdvancedSearch");
AdvancedSearchLocalHome cfh = (AdvancedSearchLocalHome) javax.rmi.PortableRemoteObject.narrow(oh,
com.centraview.advancedsearch.AdvancedSearchLocalHome.class);
AdvancedSearchLocal localAdvancedSearch = (AdvancedSearchLocal) cfh.create();
localAdvancedSearch.setDataSource(this.dataSource);
HashMap primaryTableMap = localAdvancedSearch.getPrimaryTableForModule(moduleId.intValue());
if (customFieldType.equals("SCALAR")) {
wcvo.setFieldName("customfieldscalar" + cfCounter + ".value");
wcvo.setRelationshipQuery("customfieldscalar" + cfCounter + ".customfieldId = " + rs.getInt(8) + " AND customfieldscalar" + cfCounter