/** * Checks that this user has the given rights for this database object. * * @param table the database object * @param rightMask the rights required * @throws DbException if this user does not have the required rights */ public void checkRight(Table table, int rightMask) { if (!hasRight(table, rightMask)) { throw DbException.get(ErrorCode.NOT_ENOUGH_RIGHTS_FOR_1, table.getSQL()); } }