class ComponentEntityAdapter extends MetadataNodeEntityAdapter<Component> {

  public Iterable<Component> browseByNameCaseInsensitive(final ODatabaseDocumentTx db,
                                                         final String name,
                                                         @Nullable final Iterable<Bucket> buckets,
                                                         @Nullable final String querySuffix)
  {
    checkNotNull(name);

    String whereClause = " where (ci_name = :name)";
    StringBuilder query = new StringBuilder("select from " + DB_CLASS + whereClause);

    addBucketConstraints(whereClause, buckets, query);

    if (querySuffix != null) {
      query.append(' ').append(querySuffix);
    }

    Map<String, Object> parameters = ImmutableMap.of("name", name);
    log.debug("Finding {}s with query: {}, parameters: {}", getTypeName(), query, parameters);
    return transform(db.command(new OCommandSQL(query.toString())).execute(parameters));
  }

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

}