# Class ArtifactDescriptorQuery

java.lang.Object
org.eclipse.equinox.p2.query.ExpressionMatchQuery<IArtifactDescriptor>
org.eclipse.equinox.p2.repository.artifact.ArtifactDescriptorQuery

All Implemented Interfaces:
  `IQueryWithIndex<IArtifactDescriptor>, IMatchQuery<IArtifactDescriptor>, IQuery<IArtifactDescriptor>`

public final class ArtifactDescriptorQuery extends ExpressionMatchQuery<IArtifactDescriptor>
A general purpose query for matching `IArtifactDescriptor` instances that satisfy various criteria.

Since:
  2.0

## Field Summary

Fields
Modifier and Type
Field
Description
`static final ArtifactDescriptorQuery`
`ALL_DESCRIPTORS`
A singleton query that will match all instances of `IArtifactDescriptor`.

## Constructor Summary

Constructors
Constructor
Description
`ArtifactDescriptorQuery(String id, VersionRange versionRange, String format)`
The query will match descriptors with the given `id`, `versionRange` and `format`
`ArtifactDescriptorQuery(String id, VersionRange versionRange, String format, Map<String,String> properties)`
The query will match descriptors with the given `id`, `versionRange`, `format`, and `properties`.
`ArtifactDescriptorQuery(IArtifactKey key)`
The query will match descriptors whose `id` and `versionRange` match the supplied key

## Method Summary

### Methods inherited from class ExpressionMatchQuery

`getContext, getExpression, getMatchingClass, isMatch, perform, perform, postPerform, prePerform, setIndexProvider`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### ALL_DESCRIPTORS

public static final ArtifactDescriptorQuery ALL_DESCRIPTORS
A singleton query that will match all instances of `IArtifactDescriptor`.

## Constructor Details

### ArtifactDescriptorQuery

public ArtifactDescriptorQuery(String id, VersionRange versionRange, String format)
The query will match descriptors with the given `id`, `versionRange` and `format`

Parameters:
  `id` - the descriptor id to match. Can not be `null`
  `versionRange` - the descriptor version range to match or `null` to match any version range
  `format` - the descriptor `IArtifactDescriptor.FORMAT` value to match, or `null` to match any descriptor format

### ArtifactDescriptorQuery

public ArtifactDescriptorQuery(IArtifactKey key)
The query will match descriptors whose `id` and `versionRange` match the supplied key

Parameters:
  `key` - the artifact key to match. Cannot be `null`.

### ArtifactDescriptorQuery

public ArtifactDescriptorQuery(String id, VersionRange versionRange, String format, Map<String,String> properties)
The query will match descriptors with the given `id`, `versionRange`, `format`, and `properties`.

Parameters:
  `id` - the descriptor id to match. Can not be `null`
  `versionRange` - the descriptor version range to match or `null` to match any version range
  `format` - the descriptor `IArtifactDescriptor.FORMAT` value to match, or `null` to match any descriptor format
  `properties` - The properties to query for