class AssetWhereClauseBuilder {

  @Nullable
  public static String whereClause(@Nullable final String content, final boolean includeFilter,
                                   final boolean includeLastId)
  {
    List<String> clauses = Lists.newArrayList();
    if (!Strings2.isBlank(content)) {
      clauses.add(content);
    }
    if (includeFilter) {
      clauses.add(P_NAME + " LIKE :nameFilter");
    }
    if (includeLastId) {
      clauses.add("@rid > :rid");
    }
    if (!clauses.isEmpty()) {
      return Joiner.on(" AND ").join(clauses);
    }
    else {
      return null;
    }
  }

  private  AssetWhereClauseBuilder();

}