class AssetEntityAdapter extends MetadataNodeEntityAdapter<Asset> {

  public boolean exists(final ODatabaseDocumentTx db, final String name, final Bucket bucket) {
    Map<String, Object> params = ImmutableMap.of(
        P_NAME, checkNotNull(name),
        P_BUCKET, recordIdentity(id(checkNotNull(bucket)))
    );

    OSQLSynchQuery<ODocument> query = new OSQLSynchQuery<>(EXISTS_QUERY_STRING, 1);
    return !isEmpty(db.command(query).<Iterable<ODocument>>execute(params));
  }

  @Inject public  AssetEntityAdapter(final BucketEntityAdapter bucketEntityAdapter,
                            final ComponentEntityAdapter componentEntityAdapter);

}