class ComponentEntityAdapter extends MetadataNodeEntityAdapter<Component> {

  public boolean exists(final ODatabaseDocumentTx db,
                        @Nullable final String group,
                        final String name,
                        @Nullable final String version,
                        final Bucket bucket)
  {
    Map<String, Object> params = Maps.newHashMap();
    params.put(P_GROUP, group);
    params.put(P_NAME, checkNotNull(name));
    params.put(P_VERSION, version);
    params.put(P_BUCKET, recordIdentity(id(checkNotNull(bucket))));
    OSQLSynchQuery<ODocument> query = new OSQLSynchQuery<>(EXISTS_QUERY_STRING, 1);
    return !Iterables.isEmpty(db.command(query).<Iterable<ODocument>>execute(params));
  }

  @Inject public  ComponentEntityAdapter(final BucketEntityAdapter bucketEntityAdapter,
                                final ComponentFactory componentFactory,
                                final Set<ComponentEntityAdapterExtension> componentEntityAdapterExtensions);

}