Author: rareddy
Date: 2009-04-03 18:25:56 -0400 (Fri, 03 Apr 2009)
New Revision: 712
Added:
trunk/engine/src/main/java/com/metamatrix/connector/
trunk/engine/src/main/java/com/metamatrix/connector/metadata/
trunk/engine/src/main/java/com/metamatrix/connector/metadata/internal/
trunk/engine/src/main/java/com/metamatrix/connector/metadata/internal/IObjectSource.java
Removed:
trunk/metadata/src/main/java/com/metamatrix/connector/metadata/internal/IObjectSource.java
trunk/metadata/src/main/java/com/metamatrix/dqp/service/metadata/IndexSelectorSource.java
Modified:
trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedMetadataService.java
trunk/engine/src/main/java/com/metamatrix/dqp/service/MetadataService.java
trunk/engine/src/test/java/com/metamatrix/dqp/service/FakeMetadataService.java
trunk/engine/src/test/java/org/teiid/dqp/internal/process/MockSingleMetadataService.java
trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestRequest.java
trunk/metadata/src/main/java/com/metamatrix/dqp/service/metadata/IndexMetadataService.java
trunk/metadata/src/test/java/com/metamatrix/metadata/runtime/FakeMetadataService.java
Log:
TEIID-461: Moved the required call to MedataService interface and moved the required
classes into engine.
Modified:
trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedMetadataService.java
===================================================================
---
trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedMetadataService.java 2009-04-03
22:19:05 UTC (rev 711)
+++
trunk/embedded/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedMetadataService.java 2009-04-03
22:25:56 UTC (rev 712)
@@ -34,7 +34,6 @@
import com.metamatrix.dqp.service.MetadataService;
import com.metamatrix.dqp.service.VDBLifeCycleListener;
import com.metamatrix.dqp.service.VDBService;
-import com.metamatrix.dqp.service.metadata.IndexSelectorSource;
import com.metamatrix.dqp.service.metadata.QueryMetadataCache;
import com.metamatrix.query.metadata.QueryMetadataInterface;
@@ -42,7 +41,7 @@
/**
* @since 4.3
*/
-public class EmbeddedMetadataService extends EmbeddedBaseDQPService implements
MetadataService, IndexSelectorSource {
+public class EmbeddedMetadataService extends EmbeddedBaseDQPService implements
MetadataService {
private QueryMetadataCache metadataCache = null;
private VDBLifeCycleListener listener = new VDBLifeCycleListener() {
Copied:
trunk/engine/src/main/java/com/metamatrix/connector/metadata/internal/IObjectSource.java
(from rev 701,
trunk/metadata/src/main/java/com/metamatrix/connector/metadata/internal/IObjectSource.java)
===================================================================
---
trunk/engine/src/main/java/com/metamatrix/connector/metadata/internal/IObjectSource.java
(rev 0)
+++
trunk/engine/src/main/java/com/metamatrix/connector/metadata/internal/IObjectSource.java 2009-04-03
22:25:56 UTC (rev 712)
@@ -0,0 +1,39 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package com.metamatrix.connector.metadata.internal;
+
+import java.util.Collection;
+import java.util.Map;
+
+public interface IObjectSource {
+
+ /**
+ * Return a collection that is results given the groupName(indexName) and
+ * search criteria.
+ * @param groupName The name of table/index to search.
+ * @param criteria The map of metadata field name to MetadataSearchCriteria
+ * @return The collection that is the MetadataRecord objects
+ * @since 4.3
+ */
+ Collection getObjects(String groupName, Map criteria);
+}
Modified: trunk/engine/src/main/java/com/metamatrix/dqp/service/MetadataService.java
===================================================================
--- trunk/engine/src/main/java/com/metamatrix/dqp/service/MetadataService.java 2009-04-03
22:19:05 UTC (rev 711)
+++ trunk/engine/src/main/java/com/metamatrix/dqp/service/MetadataService.java 2009-04-03
22:25:56 UTC (rev 712)
@@ -24,6 +24,7 @@
import com.metamatrix.api.exception.MetaMatrixComponentException;
import com.metamatrix.common.application.ApplicationService;
+import com.metamatrix.connector.metadata.internal.IObjectSource;
import com.metamatrix.query.metadata.QueryMetadataInterface;
/**
@@ -32,4 +33,6 @@
public QueryMetadataInterface lookupMetadata(String vdbName, String vdbVersion)
throws MetaMatrixComponentException;
+ IObjectSource getMetadataObjectSource(String vdbName, String vdbVersion) throws
MetaMatrixComponentException;
+
}
Modified: trunk/engine/src/test/java/com/metamatrix/dqp/service/FakeMetadataService.java
===================================================================
---
trunk/engine/src/test/java/com/metamatrix/dqp/service/FakeMetadataService.java 2009-04-03
22:19:05 UTC (rev 711)
+++
trunk/engine/src/test/java/com/metamatrix/dqp/service/FakeMetadataService.java 2009-04-03
22:25:56 UTC (rev 712)
@@ -25,6 +25,8 @@
import java.util.HashMap;
import java.util.Map;
+import com.metamatrix.api.exception.MetaMatrixComponentException;
+import com.metamatrix.connector.metadata.internal.IObjectSource;
import com.metamatrix.query.metadata.QueryMetadataInterface;
import com.metamatrix.query.unittest.FakeMetadataFactory;
@@ -71,4 +73,10 @@
return (QueryMetadataInterface) vdbMap.get(getKey(vdbName, vdbVersion));
}
+ @Override
+ public IObjectSource getMetadataObjectSource(String vdbName,
+ String vdbVersion) throws MetaMatrixComponentException {
+ return null;
+ }
+
}
Modified:
trunk/engine/src/test/java/org/teiid/dqp/internal/process/MockSingleMetadataService.java
===================================================================
---
trunk/engine/src/test/java/org/teiid/dqp/internal/process/MockSingleMetadataService.java 2009-04-03
22:19:05 UTC (rev 711)
+++
trunk/engine/src/test/java/org/teiid/dqp/internal/process/MockSingleMetadataService.java 2009-04-03
22:25:56 UTC (rev 712)
@@ -28,6 +28,7 @@
import com.metamatrix.common.application.ApplicationEnvironment;
import com.metamatrix.common.application.exception.ApplicationInitializationException;
import com.metamatrix.common.application.exception.ApplicationLifecycleException;
+import com.metamatrix.connector.metadata.internal.IObjectSource;
import com.metamatrix.dqp.service.MetadataService;
import com.metamatrix.query.metadata.QueryMetadataInterface;
@@ -59,4 +60,9 @@
}
+ @Override
+ public IObjectSource getMetadataObjectSource(String vdbName,String vdbVersion) throws
MetaMatrixComponentException {
+ return null;
+ }
+
}
Modified: trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestRequest.java
===================================================================
--- trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestRequest.java 2009-04-03
22:19:05 UTC (rev 711)
+++ trunk/engine/src/test/java/org/teiid/dqp/internal/process/TestRequest.java 2009-04-03
22:25:56 UTC (rev 712)
@@ -45,6 +45,7 @@
import com.metamatrix.common.application.ApplicationService;
import com.metamatrix.common.buffer.BufferManager;
import com.metamatrix.common.vdb.api.ModelInfo;
+import com.metamatrix.connector.metadata.internal.IObjectSource;
import com.metamatrix.dqp.message.RequestMessage;
import com.metamatrix.dqp.service.AutoGenDataService;
import com.metamatrix.dqp.service.DQPServiceNames;
@@ -283,6 +284,11 @@
public synchronized QueryMetadataInterface lookupMetadata(String vdbName, String
vdbVersion) {
return metadata;
}
+
+ @Override
+ public IObjectSource getMetadataObjectSource(String vdbName,String vdbVersion) throws
MetaMatrixComponentException {
+ return null;
+ }
}
}
Deleted:
trunk/metadata/src/main/java/com/metamatrix/connector/metadata/internal/IObjectSource.java
===================================================================
---
trunk/metadata/src/main/java/com/metamatrix/connector/metadata/internal/IObjectSource.java 2009-04-03
22:19:05 UTC (rev 711)
+++
trunk/metadata/src/main/java/com/metamatrix/connector/metadata/internal/IObjectSource.java 2009-04-03
22:25:56 UTC (rev 712)
@@ -1,39 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package com.metamatrix.connector.metadata.internal;
-
-import java.util.Collection;
-import java.util.Map;
-
-public interface IObjectSource {
-
- /**
- * Return a collection that is results given the groupName(indexName) and
- * search criteria.
- * @param groupName The name of table/index to search.
- * @param criteria The map of metadata field name to MetadataSearchCriteria
- * @return The collection that is the MetadataRecord objects
- * @since 4.3
- */
- Collection getObjects(String groupName, Map criteria);
-}
Modified:
trunk/metadata/src/main/java/com/metamatrix/dqp/service/metadata/IndexMetadataService.java
===================================================================
---
trunk/metadata/src/main/java/com/metamatrix/dqp/service/metadata/IndexMetadataService.java 2009-04-03
22:19:05 UTC (rev 711)
+++
trunk/metadata/src/main/java/com/metamatrix/dqp/service/metadata/IndexMetadataService.java 2009-04-03
22:25:56 UTC (rev 712)
@@ -49,7 +49,7 @@
/**
* @since 4.2
*/
-public class IndexMetadataService implements MetadataService, IndexSelectorSource {
+public class IndexMetadataService implements MetadataService {
private VDBService vdbService;
private boolean started = false;
Deleted:
trunk/metadata/src/main/java/com/metamatrix/dqp/service/metadata/IndexSelectorSource.java
===================================================================
---
trunk/metadata/src/main/java/com/metamatrix/dqp/service/metadata/IndexSelectorSource.java 2009-04-03
22:19:05 UTC (rev 711)
+++
trunk/metadata/src/main/java/com/metamatrix/dqp/service/metadata/IndexSelectorSource.java 2009-04-03
22:25:56 UTC (rev 712)
@@ -1,33 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * See the COPYRIGHT.txt file distributed with this work for information
- * regarding copyright ownership. Some portions may be licensed
- * to Red Hat, Inc. under one or more contributor license agreements.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA.
- */
-
-package com.metamatrix.dqp.service.metadata;
-
-import com.metamatrix.api.exception.MetaMatrixComponentException;
-import com.metamatrix.connector.metadata.internal.IObjectSource;
-
-/**
- * Interface used by the index metadata connector to obtain the VDB index selector.
- */
-public interface IndexSelectorSource {
- IObjectSource getMetadataObjectSource(String vdbName, String vdbVersion) throws
MetaMatrixComponentException;
-}
Modified:
trunk/metadata/src/test/java/com/metamatrix/metadata/runtime/FakeMetadataService.java
===================================================================
---
trunk/metadata/src/test/java/com/metamatrix/metadata/runtime/FakeMetadataService.java 2009-04-03
22:19:05 UTC (rev 711)
+++
trunk/metadata/src/test/java/com/metamatrix/metadata/runtime/FakeMetadataService.java 2009-04-03
22:25:56 UTC (rev 712)
@@ -40,7 +40,6 @@
import com.metamatrix.core.util.TempDirectoryMonitor;
import com.metamatrix.dqp.service.FakeVDBService;
import com.metamatrix.dqp.service.MetadataService;
-import com.metamatrix.dqp.service.metadata.IndexSelectorSource;
import com.metamatrix.modeler.core.index.IndexSelector;
import com.metamatrix.modeler.internal.core.index.CompositeIndexSelector;
import com.metamatrix.modeler.internal.core.index.RuntimeIndexSelector;
@@ -48,7 +47,7 @@
import com.metamatrix.query.metadata.QueryMetadataInterface;
-public class FakeMetadataService implements ApplicationService, MetadataService,
IndexSelectorSource {
+public class FakeMetadataService implements ApplicationService, MetadataService {
private IndexSelector systemIndexSelector;
private RuntimeIndexSelector runtimeIndexSelector;
private boolean useOnlySystemVdb = false;