Package org.apache.derby.iapi.sql.dictionary

Examples of org.apache.derby.iapi.sql.dictionary.StatementTablePermission


          //First check if we are dealing with a Table or
          //Column level privilege. All the other privileges
          //are not required for a foreign key constraint.
          if (statPerm instanceof StatementTablePermission)
          {//It is a table/column level privilege
            StatementTablePermission statementTablePermission =
              (StatementTablePermission) statPerm;
            //Check if we are dealing with REFERENCES privilege.
            //If not, move on to the next privilege in the
            //required privileges list
            if (statementTablePermission.getPrivType() != Authorizer.REFERENCES_PRIV)
              continue;
            //Next check is this REFERENCES privilege is
            //on the same table as referenced by the foreign
            //key constraint? If not, move on to the next
            //privilege in the required privileges list
            if (!statementTablePermission.getTableUUID().equals(refTableUUID))
              continue;
          } else if (statPerm instanceof StatementSchemaPermission
              || statPerm instanceof StatementRoutinePermission)
            continue;
View Full Code Here


          //First check if we are dealing with a Table or
          //Column level privilege. All the other privileges
          //are not required for a foreign key constraint.
          if (statPerm instanceof StatementTablePermission)
          {//It is a table/column level privilege
            StatementTablePermission statementTablePermission =
              (StatementTablePermission) statPerm;
            //Check if we are dealing with REFERENCES privilege.
            //If not, move on to the next privilege in the
            //required privileges list
            if (statementTablePermission.getPrivType() != Authorizer.REFERENCES_PRIV)
              continue;
            //Next check is this REFERENCES privilege is
            //on the same table as referenced by the foreign
            //key constraint? If not, move on to the next
            //privilege in the required privileges list
            if (!statementTablePermission.getTableUUID().equals(refTableUUID))
              continue;
          } else if (statPerm instanceof StatementSchemaPermission
              || statPerm instanceof StatementRoutinePermission)
            continue;
View Full Code Here

    */
    TableDescriptor td = column.getTableDescriptor();
    if (td == null)
      return;
    UUID tableUUID = td.getUUID();
    StatementTablePermission key = new StatementTablePermission( tableUUID, currPrivType);
    StatementColumnPermission tableColumnPrivileges
      = (StatementColumnPermission) requiredColumnPrivileges.get( key);
    if( tableColumnPrivileges == null)
    {
      tableColumnPrivileges = new StatementColumnPermission( tableUUID,
View Full Code Here

  public void addRequiredTablePriv( TableDescriptor table)
  {
    if( requiredTablePrivileges == null || table == null)
      return;

    StatementTablePermission key = new StatementTablePermission( table.getUUID(), currPrivType);
    requiredTablePrivileges.put(key, key);
  }
View Full Code Here

          //First check if we are dealing with a Table or
          //Column level privilege. All the other privileges
          //are not required for a foreign key constraint.
          if (statPerm instanceof StatementTablePermission)
          {//It is a table/column level privilege
            StatementTablePermission statementTablePermission =
              (StatementTablePermission) statPerm;
            //Check if we are dealing with REFERENCES privilege.
            //If not, move on to the next privilege in the
            //required privileges list
            if (statementTablePermission.getPrivType() != Authorizer.REFERENCES_PRIV)
              continue;
            //Next check is this REFERENCES privilege is
            //on the same table as referenced by the foreign
            //key constraint? If not, move on to the next
            //privilege in the required privileges list
            if (!statementTablePermission.getTableUUID().equals(refTableUUID))
              continue;
          } else if (statPerm instanceof StatementSchemaPermission
                || statPerm instanceof StatementRolePermission
                               || statPerm instanceof StatementGenericPermission ) {
            continue;
View Full Code Here

      //check if there is already a SELECT privilege requirement on any
      //of the columns in the table. If yes, then we do not need to add
      //MIN_SELECT_PRIV requirement for the table because that
      //requirement is already getting satisfied with the already
      //existing SELECT privilege requirement
      StatementTablePermission key = new StatementTablePermission(
          tableUUID, Authorizer.SELECT_PRIV);
      StatementColumnPermission tableColumnPrivileges
        = (StatementColumnPermission) requiredColumnPrivileges.get( key);
      if( tableColumnPrivileges != null)
        return;
    }
    if( currPrivType == Authorizer.SELECT_PRIV){
      //If we are here for SELECT_PRIV requirement, then first check
      //if there is already any MIN_SELECT_PRIV privilege required
      //on this table. If yes, then that requirement will be fulfilled
      //by the SELECT_PRIV requirement we are adding now. Because of
      //that, remove the MIN_SELECT_PRIV privilege requirement
      StatementTablePermission key = new StatementTablePermission(
          tableUUID, Authorizer.MIN_SELECT_PRIV);
      StatementColumnPermission tableColumnPrivileges
        = (StatementColumnPermission) requiredColumnPrivileges.get( key);
      if( tableColumnPrivileges != null)
        requiredColumnPrivileges.remove(key);
    }
   
    StatementTablePermission key = new StatementTablePermission( tableUUID, currPrivType);
    StatementColumnPermission tableColumnPrivileges
      = (StatementColumnPermission) requiredColumnPrivileges.get( key);
    if( tableColumnPrivileges == null)
    {
      tableColumnPrivileges = new StatementColumnPermission( tableUUID,
View Full Code Here

      //DERBY-4191
      //Check if there is any MIN_SELECT_PRIV select privilege required
      //on this table. If yes, then that requirement will be fulfilled
      //by the SELECT_PRIV requirement we are adding now. Because of
      //that, remove the MIN_SELECT_PRIV privilege requirement
      StatementTablePermission key = new StatementTablePermission(
          table.getUUID(), Authorizer.MIN_SELECT_PRIV);
      StatementColumnPermission tableColumnPrivileges
        = (StatementColumnPermission) requiredColumnPrivileges.get( key);
      if( tableColumnPrivileges != null)
        requiredColumnPrivileges.remove(key);
    }

    StatementTablePermission key = new StatementTablePermission( table.getUUID(), currPrivType);
    requiredTablePrivileges.put(key, key);
  }
View Full Code Here

          //First check if we are dealing with a Table or
          //Column level privilege. All the other privileges
          //are not required for a foreign key constraint.
          if (statPerm instanceof StatementTablePermission)
          {//It is a table/column level privilege
            StatementTablePermission statementTablePermission =
              (StatementTablePermission) statPerm;
            //Check if we are dealing with REFERENCES privilege.
            //If not, move on to the next privilege in the
            //required privileges list
            if (statementTablePermission.getPrivType() != Authorizer.REFERENCES_PRIV)
              continue;
            //Next check is this REFERENCES privilege is
            //on the same table as referenced by the foreign
            //key constraint? If not, move on to the next
            //privilege in the required privileges list
            if (!statementTablePermission.getTableUUID().equals(refTableUUID))
              continue;
          } else if (statPerm instanceof StatementSchemaPermission
                || statPerm instanceof StatementRolePermission) {
            continue;
          } else {
View Full Code Here

        TableDescriptor.GLOBAL_TEMPORARY_TABLE_TYPE) {
      return; // no priv needed, it is per session anyway
    }

    UUID tableUUID = td.getUUID();
    StatementTablePermission key = new StatementTablePermission( tableUUID, currPrivType);
    StatementColumnPermission tableColumnPrivileges
      = (StatementColumnPermission) requiredColumnPrivileges.get( key);
    if( tableColumnPrivileges == null)
    {
      tableColumnPrivileges = new StatementColumnPermission( tableUUID,
View Full Code Here

    if (table.getTableType() ==
        TableDescriptor.GLOBAL_TEMPORARY_TABLE_TYPE) {
      return; // no priv needed, it is per session anyway
    }

    StatementTablePermission key = new StatementTablePermission( table.getUUID(), currPrivType);
    requiredTablePrivileges.put(key, key);
  }
View Full Code Here

TOP

Related Classes of org.apache.derby.iapi.sql.dictionary.StatementTablePermission

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.