Eclipse Platform
Release 3.6

org.eclipse.equinox.p2.metadata.query
Class InstallableUnitQuery

java.lang.Object
  extended by org.eclipse.equinox.p2.metadata.query.ExpressionQuery<IInstallableUnit>
      extended by org.eclipse.equinox.p2.metadata.query.InstallableUnitQuery
All Implemented Interfaces:
org.eclipse.equinox.p2.metadata.index.IQueryWithIndex<IInstallableUnit>, IMatchQuery<IInstallableUnit>, IQuery<IInstallableUnit>

public final class InstallableUnitQuery
extends ExpressionQuery<IInstallableUnit>

A query that matches on the id and version of an IInstallableUnit.

Since:
2.0

Field Summary
static InstallableUnitQuery ANY
          A convenience query that will match any IInstallableUnit it encounters.
 
Constructor Summary
InstallableUnitQuery(IVersionedId versionedId)
          Creates a query that will match any IInstallableUnit with the given id and version.
InstallableUnitQuery(String id)
          Creates a query that will match any IInstallableUnit with the given id, regardless of version.
InstallableUnitQuery(String id, Version version)
          Creates a query that will match any IInstallableUnit with the given id and version.
InstallableUnitQuery(String id, VersionRange range)
          Creates a query that will match any IInstallableUnit with the given id, and whose version falls in the provided range.
 
Method Summary
 String getId()
          Returns the id that this query will match against.
 
Methods inherited from class org.eclipse.equinox.p2.metadata.query.ExpressionQuery
getContext, getExpression, getMatchingClass, isMatch, matchAll, matchNothing, perform, perform, postPerform, prePerform, setIndexProvider
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ANY

public static final InstallableUnitQuery ANY
A convenience query that will match any IInstallableUnit it encounters.

Constructor Detail

InstallableUnitQuery

public InstallableUnitQuery(String id)
Creates a query that will match any IInstallableUnit with the given id, regardless of version.

Parameters:
id - The installable unit id to match, or null to match any id

InstallableUnitQuery

public InstallableUnitQuery(String id,
                            VersionRange range)
Creates a query that will match any IInstallableUnit with the given id, and whose version falls in the provided range.

Parameters:
id - The installable unit id to match, or null to match any id
range - The version range to match

InstallableUnitQuery

public InstallableUnitQuery(String id,
                            Version version)
Creates a query that will match any IInstallableUnit with the given id and version.

Parameters:
id - The installable unit id to match, or null to match any id
version - The precise version that a matching unit must have

InstallableUnitQuery

public InstallableUnitQuery(IVersionedId versionedId)
Creates a query that will match any IInstallableUnit with the given id and version.

Parameters:
versionedId - The precise id/version combination that a matching unit must have
Method Detail

getId

public String getId()
Returns the id that this query will match against.

Returns:
The installable unit it

Eclipse Platform
Release 3.6

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2010. All rights reserved.