public String getActualSql(Object[] args) {
		String[] tableNames = null;
		String sql;

		if (genericIndexes != null) {
			for (Integer index : genericIndexes) {
				if (index != null) {
					Object arg = args[index];
					if (arg != null) {
						tableNames = (String[]) ArrayHelper.add(tableNames, arg.toString());
					}
				}
			}
		}

		if (tableNames != null) {
			sql = SqlFormatter.formatSql(preparedSql, tableNames);
		} else {
			sql = preparedSql;
		}

		return sql;
	}