diff options
author | Pascal Rapicault | 2010-03-11 23:47:35 +0000 |
---|---|---|
committer | Pascal Rapicault | 2010-03-11 23:47:35 +0000 |
commit | 0e64148bb2966c8d6186ce614f19e4ad21bbdd9b (patch) | |
tree | be02f28a1356086df2656b375e638a0140f17c51 /bundles/org.eclipse.equinox.p2.metadata/src | |
parent | 759fadfba4d8846636243ae52c2cc7ceb881093a (diff) | |
download | rt.equinox.p2-0e64148bb2966c8d6186ce614f19e4ad21bbdd9b.tar.gz rt.equinox.p2-0e64148bb2966c8d6186ce614f19e4ad21bbdd9b.tar.xz rt.equinox.p2-0e64148bb2966c8d6186ce614f19e4ad21bbdd9b.zip |
Bug 305598 - [api] Mark MatchQuery and IMatchQuery as deprecated
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.metadata/src')
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> { |