Пример #1
0
 public static String getSelect(final SQLiteView view) {
   final Class<?> klass = view.getClass();
   try {
     final String clause = getSelect(klass);
     return clause;
   } catch (final Exception e) {
     Logger.ex(e);
     return "";
   }
 }
Пример #2
0
  private static String getColumnString(final Class<?> klass) {
    final StringBuilder builder = new StringBuilder();

    try {
      getSelectColumns(klass, builder);
    } catch (final Exception e) {
      Logger.ex(e);
    }

    if (builder.length() > 0) {
      builder.deleteCharAt(builder.length() - 1);
    } else {
      builder.append("*");
    }

    return builder.toString();
  }
Пример #3
0
  public static String getColumns(final SQLiteTable table) {
    final Class<?> klass = table.getClass();

    final StringBuilder builder = new StringBuilder();
    final ConcatMap uniqueMap = new ConcatMap(",");

    try {
      getColumns(klass, builder, uniqueMap);
    } catch (final Exception e) {
      Logger.ex(e);
    }

    builder.append(getUnique(uniqueMap));

    if (builder.length() > 0) {
      builder.deleteCharAt(builder.length() - 1);
    }

    return builder.toString();
  }