HashSet missingPreviousColumns = new HashSet();
missingPreviousColumns.add("filename");
missingPreviousColumns.add("content_type");
missingPreviousColumns.add("file");
missingPreviousColumns.add("file_size");
DatabaseMetaData metaData = session.connection().getMetaData();
ResultSet columns = metaData.getColumns(null, "%", "note", "%");
while (columns.next()) {
missingPreviousColumns.remove(columns.getString("COLUMN_NAME"));
}
if (missingPreviousColumns.size() == 4) {