List of usage examples for android.content ContentResolver CURSOR_ITEM_BASE_TYPE
String CURSOR_ITEM_BASE_TYPE
To view the source code for android.content ContentResolver CURSOR_ITEM_BASE_TYPE.
Click Source Link
From source file:pl.selvin.android.syncframework.content.TableInfo.java
TableInfo(String scope, String name, ArrayList<ColumnInfo> columns, ArrayList<ColumnInfo> columnsComputed,
HashMap<String, ColumnInfo> columnsHash, String[] primaryKey, Table table, String AUTHORITY) {
this.name = name;
final Cascade[] delete = table.delete();
cascadeDelete = delete.length > 0 ? new CascadeInfo[delete.length] : null;
for (int i = 0; i < delete.length; i++) {
cascadeDelete[i] = new CascadeInfo(delete[i]);
}//w w w . j a v a2 s .c om
readonly = table.readonly();
this.columns = columns.toArray(new ColumnInfo[columns.size()]);
map.put("_id", "[" + name + "].ROWID AS _id");
for (ColumnInfo ci : columns) {
map.put(ci.name, ci.name);
}
this.columnsComputed = columnsComputed.toArray(new ColumnInfo[columnsComputed.size()]);
for (ColumnInfo ci : columnsComputed) {
map.put(ci.name, String.format("%s AS %s", ci.computed, ci.name));
}
this.scope = scope;
this.primaryKey = new ColumnInfo[primaryKey.length];
for (int c = 0; c < primaryKey.length; c++) {
this.primaryKey[c] = columnsHash.get(primaryKey[c]);
}
this.primaryKeyStrings = primaryKey;
scope_name = String.format("%s.%s", scope, name);
DirMime = String.format("%s/%s.%s", ContentResolver.CURSOR_DIR_BASE_TYPE, AUTHORITY, scope_name);
ItemMime = String.format("%s/%s.%s", ContentResolver.CURSOR_ITEM_BASE_TYPE, AUTHORITY, scope_name);
notifyUris = table.notifyUris();
}