|
|
@ -77,21 +77,23 @@ public class FilesControlSet extends PopupControlSet {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void refreshMetadata() {
|
|
|
|
public void refreshMetadata() {
|
|
|
|
TodorooCursor<Metadata> cursor = metadataService.query(
|
|
|
|
if (model != null) {
|
|
|
|
Query.select(Metadata.PROPERTIES)
|
|
|
|
TodorooCursor<Metadata> cursor = metadataService.query(
|
|
|
|
.where(MetadataCriteria.byTaskAndwithKey(model.getId(), FileMetadata.METADATA_KEY)));
|
|
|
|
Query.select(Metadata.PROPERTIES)
|
|
|
|
try {
|
|
|
|
.where(MetadataCriteria.byTaskAndwithKey(model.getId(), FileMetadata.METADATA_KEY)));
|
|
|
|
files.clear();
|
|
|
|
try {
|
|
|
|
for (cursor.moveToFirst(); !cursor.isAfterLast(); cursor.moveToNext()) {
|
|
|
|
files.clear();
|
|
|
|
Metadata metadata = new Metadata();
|
|
|
|
for (cursor.moveToFirst(); !cursor.isAfterLast(); cursor.moveToNext()) {
|
|
|
|
metadata.readFromCursor(cursor);
|
|
|
|
Metadata metadata = new Metadata();
|
|
|
|
files.add(metadata);
|
|
|
|
metadata.readFromCursor(cursor);
|
|
|
|
|
|
|
|
files.add(metadata);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} finally {
|
|
|
|
|
|
|
|
cursor.close();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} finally {
|
|
|
|
if (initialized)
|
|
|
|
cursor.close();
|
|
|
|
afterInflate();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (initialized)
|
|
|
|
|
|
|
|
afterInflate();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|