final int object_name = 4;
final int object_type = 5;
final int privilege_type = 6;
final int is_grantable = 7;
PersistentStore store = database.persistentStoreCollection.getStore(t);
Iterator objects =
new WrapperIterator(database.schemaManager
.databaseObjectIterator(SchemaObject.SEQUENCE), database
.schemaManager.databaseObjectIterator(SchemaObject.COLLATION));
objects = new WrapperIterator(
objects,
database.schemaManager.databaseObjectIterator(
SchemaObject.CHARSET));
objects = new WrapperIterator(
objects,
database.schemaManager.databaseObjectIterator(
SchemaObject.DOMAIN));
/*
objects = new WrapperIterator(
objects,
database.schemaManager.databaseObjectIterator(SchemaObject.TYPE));
*/
OrderedHashSet grantees =
session.getGrantee().getGranteeAndAllRolesWithPublic();
while (objects.hasNext()) {
SchemaObject object = (SchemaObject) objects.next();
for (int i = 0; i < grantees.size(); i++) {
Grantee granteeObject = (Grantee) grantees.get(i);
OrderedHashSet rights =
granteeObject.getAllDirectPrivileges(object);