RightOwner

A right owner (sometimes called principal).

Methods
Right getRightForObject(DbObject object)
Get the 'grant schema' right of this object.
Right getRightForObject(DbObject object)
Get the 'grant schema' right of this object.
Parameters:
object - the granted object (table or schema)
Returns:
the right or null if the right has not been granted
Right getRightForRole(Role role)
Get the 'grant role' right of this object.
Right getRightForRole(Role role)
Get the 'grant role' right of this object.
Parameters:
role - the granted role
Returns:
the right or null if the right has not been granted
void grantRight(DbObject object, Right right)
Grant a right for the given table.
void grantRight(DbObject object, Right right)
Grant a right for the given table. Only one right object per table is supported.
Parameters:
object - the object (table or schema)
right - the right
void grantRole(Role role, Right right)
Grant a role to this object.
void grantRole(Role role, Right right)
Grant a role to this object.
Parameters:
role - the role
right - the right to grant
boolean isRightGrantedRecursive(Table table, int rightMask)
Check if a right is already granted to this object or to objects that were granted to this object.
boolean isRightGrantedRecursive(Table table, int rightMask)
Check if a right is already granted to this object or to objects that were granted to this object. The rights for schemas takes precedence over rights of tables, in other words, the rights of schemas will be valid for every each table in the related schema.
Parameters:
table - the table to check
rightMask - the right mask to check
Returns:
true if the right was already granted
boolean isRoleGranted(Role grantedRole)
Check if a role has been granted for this right owner.
boolean isRoleGranted(Role grantedRole)
Check if a role has been granted for this right owner.
Parameters:
grantedRole - the role
Returns:
true if the role has been granted
void revokeRight(DbObject object)
Revoke the right for the given object (table or schema).
void revokeRight(DbObject object)
Revoke the right for the given object (table or schema).
Parameters:
object - the object
void revokeRole(Role role)
Remove the right for the given role.
void revokeRole(Role role)
Remove the right for the given role.
Parameters:
role - the role to revoke