Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault2010-03-11 23:42:50 +0000
committerPascal Rapicault2010-03-11 23:42:50 +0000
commit64258431afeaabbab9f0debf2c62084429705121 (patch)
tree5acef135547f711518e3170cc33d7c056f17ab3c
parentbad0a89a7ebe16fa6ea2631af596ec779de210c4 (diff)
downloadrt.equinox.p2-Bug305598.tar.gz
rt.equinox.p2-Bug305598.tar.xz
rt.equinox.p2-Bug305598.zip
Bug 305598 - [api] Mark MatchQuery and IMatchQuery as deprecatedv20100311-1843Bug305598
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/IMatchQuery.java12
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/MatchQuery.java9
2 files changed, 19 insertions, 2 deletions
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/IMatchQuery.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/IMatchQuery.java
index aebceca27..1d8dd169e 100644
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/IMatchQuery.java
+++ b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/IMatchQuery.java
@@ -16,8 +16,16 @@ package org.eclipse.equinox.p2.query;
* exclusive from all other calls. <P>
*
* @noimplement This interface is not intended to be implemented by clients. Clients
- * creating custom queries must extend {@link ExpressionMatchQuery} or
- * {@link MatchQuery} instead.
+ * creating custom queries must extend {@link ExpressionMatchQuery}.
+ * @deprecated This interface is likely to be removed in 3.6M7. If possible, use one of the
+ * predefined queries in {@link QueryUtil} or use the {@link QueryUtil#createMatchQuery(String, Object...)}
+ * to create a custom expression based query. If the query cannot be expressed using
+ * the p2QL, then use a predefined or custom expression query as a first filter
+ * (in worst case, use {@link QueryUtil#createIUAnyQuery()}) and then provide further filtering
+ * like so:<pre>
+ * for(iter = queryable.query(someExpressionQuery).iterator(); iter.hasNext();) {
+ * // do your match here
+ * }</pre>
* @since 2.0
*/
public interface IMatchQuery<T> extends IQuery<T> {
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/MatchQuery.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/MatchQuery.java
index 6798a47d5..2fa19434b 100644
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/MatchQuery.java
+++ b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/MatchQuery.java
@@ -24,6 +24,15 @@ import org.eclipse.equinox.p2.metadata.expression.IExpression;
* remote execution. This class is intended for simple queries against small data
* sources where indexed lookup and remote query execution are not needed.
* </p>
+ * @deprecated This class is likely to be removed in 3.6M7. If possible, use one of the
+ * predefined queries in {@link QueryUtil} or use the {@link QueryUtil#createMatchQuery(String, Object...)}
+ * to create a custom expression based query. If the query cannot be expressed using
+ * the p2QL, then use a predefined or custom expression query as a first filter
+ * (in worst case, use {@link QueryUtil#createIUAnyQuery()}) and then provide further filtering
+ * like so:<pre>
+ * for(iter = queryable.query(someExpressionQuery).iterator(); iter.hasNext();) {
+ * // do your match here
+ * }</pre>
* @since 2.0
*/
public abstract class MatchQuery<T> implements IMatchQuery<T> {

Back to the top