rights = grants;
}
for (int j = 0; j < rights.size(); j++) {
Right right = (Right) rights.get(j);
Right grantableRight = right.getGrantableRights();
for (int k = 0; k < Right.privilegeTypes.length; k++) {
if (!right.canAccessFully(Right.privilegeTypes[k])) {
continue;
}
Routine[] specifics = routine.getSpecificRoutines();
for (int m = 0; m < specifics.length; m++) {
privilege = Right.privilegeNames[k];
row = t.getEmptyRowData();
//
row[grantor] = right.getGrantor().getName().name;
row[grantee] = right.getGrantee().getName().name;
row[specific_catalog] =
database.getCatalogName().name;
row[specific_schema] =
specifics[m].getSchemaName().name;
row[specific_name] =
specifics[m].getSpecificName().name;
row[routine_catalog] =
database.getCatalogName().name;
row[routine_schema] = routine.getSchemaName().name;
row[routine_name] = routine.getName().name;
row[privilege_type] = privilege;
row[is_grantable] =
right.getGrantee() == routine.getOwner()
|| grantableRight.canAccessFully(
Right.privilegeTypes[k]) ? "YES"
: "NO";
try {
t.insertSys(store, row);