throws Exception
{
tracer.fine("Dropping AuthIds.");
List<String> list = new ArrayList<String>();
final FarragoRepos repos = getRepos();
final SqlBuilder buf = new SqlBuilder(SqlDialect.EIGENBASE);
if (repos != null) {
for (FemAuthId authId : repos.allOfType(FemAuthId.class)) {
if (isBlessedAuthId(authId)) {
continue;
}
list.add(
buf.append("drop ")
.append(authId instanceof FemRole ? "ROLE" : "USER")
.append(" ")
.identifier(authId.getName())
.getSqlAndClear());
}
} else if (stmt != null) {
if (stmt.execute(
"select \"name\",\"mofClassName\" from "
+ "sys_fem.\"Security\".\"AuthId\""))
{
ResultSet rset = stmt.getResultSet();
while (rset.next()) {
String name = rset.getString(1);
String className = rset.getString(2);
if (isBlessedAuthId(name)) {
continue;
}
list.add(
buf.append("drop ")
.append(className + " " + name)
.getSqlAndClear());
}
}
}