FileUtil.write(sqlFile, "");
}
Map<String, String> indexSQLs = new TreeMap<String, String>();
UnsyncBufferedReader unsyncBufferedReader = new UnsyncBufferedReader(
new FileReader(sqlFile));
while (true) {
String indexSQL = unsyncBufferedReader.readLine();
if (indexSQL == null) {
break;
}
if (Validator.isNotNull(indexSQL.trim())) {
int pos = indexSQL.indexOf(" on ");
String indexSpec = indexSQL.substring(pos + 4);
indexSQLs.put(indexSpec, indexSQL);
}
}
unsyncBufferedReader.close();
// indexes.properties
File propsFile = new File(
_sqlDir + "/" + _sqlIndexesPropertiesFileName);
if (!propsFile.exists()) {
FileUtil.write(propsFile, "");
}
Map<String, String> indexProps = new TreeMap<String, String>();
unsyncBufferedReader = new UnsyncBufferedReader(
new FileReader(propsFile));
while (true) {
String indexMapping = unsyncBufferedReader.readLine();
if (indexMapping == null) {
break;
}
if (Validator.isNotNull(indexMapping.trim())) {
String[] splitIndexMapping = indexMapping.split("\\=");
indexProps.put(splitIndexMapping[1], splitIndexMapping[0]);
}
}
unsyncBufferedReader.close();
// indexes.sql
for (int i = 0; i < _ejbList.size(); i++) {
Entity entity = _ejbList.get(i);