Package org.apache.derby.iapi.services.io

Examples of org.apache.derby.iapi.services.io.FormatableBitSet


    {
      colPermsDescriptor = (ColPermsDescriptor) iterator.next();
      removePermEntryInCache(colPermsDescriptor);
      uuidKey = rf.buildIndexKeyRow(rf.COLPERMSID_INDEX_NUM, colPermsDescriptor);
      curRow=ti.getRow(tc, uuidKey, rf.COLPERMSID_INDEX_NUM);
          FormatableBitSet columns = (FormatableBitSet) curRow.getColumn(
            SYSCOLPERMSRowFactory.COLUMNS_COL_NUM).getObject();
      // See whether this is ADD COLUMN or DROP COLUMN. If ADD, then
      // add a new bit to the bit set. If DROP, then remove the bit
      // for the dropped column.
      if (columnDescriptor == null)
      {
        int currentLength = columns.getLength();
        columns.grow(currentLength+1);
      }
      else
      {
        FormatableBitSet modifiedColumns=new FormatableBitSet(columns);
        modifiedColumns.shrink(columns.getLength()-1);
        // All the bits from 0 ... colPosition-2 are OK. The bits from
        // colPosition to the end need to be shifted 1 to the left.
        // The bit for colPosition-1 simply disappears from COLUMNS.
        // ColumnPosition values count from 1, while bits in the
        // FormatableBitSet count from 0.
        for (int i = columnDescriptor.getPosition()-1;
            i < modifiedColumns.getLength();
            i++)
        {
          if (columns.isSet(i+1))
            modifiedColumns.set(i);
          else
            modifiedColumns.clear(i);
        }
        columns = modifiedColumns;
      }
          curRow.setColumn(SYSCOLPERMSRowFactory.COLUMNS_COL_NUM,
            dvf.getDataValue((Object) columns));
View Full Code Here


    TabInfoImpl ti = getNonCoreTI(SYSSTATEMENTS_CATALOG_NUM);
    faultInTabInfo(ti);

    TransactionController tc = getTransactionExecute();

    FormatableBitSet columnToReadSet = new FormatableBitSet(SYSSTATEMENTSRowFactory.SYSSTATEMENTS_COLUMN_COUNT);
    FormatableBitSet columnToUpdateSet = new FormatableBitSet(SYSSTATEMENTSRowFactory.SYSSTATEMENTS_COLUMN_COUNT);
    columnToUpdateSet.set(SYSSTATEMENTSRowFactory.SYSSTATEMENTS_VALID -1);
    columnToUpdateSet.set(SYSSTATEMENTSRowFactory.SYSSTATEMENTS_CONSTANTSTATE -1);

    DataValueDescriptor[] replaceRow =
            new DataValueDescriptor[SYSSTATEMENTSRowFactory.SYSSTATEMENTS_COLUMN_COUNT];

    /* Set up a couple of row templates for fetching CHARS */
 
View Full Code Here

                outRow);
 
      // just interested in one column
      DataValueDescriptor[] rowTemplate    =
              new DataValueDescriptor[SYSCONSTRAINTSRowFactory.SYSCONSTRAINTS_COLUMN_COUNT];
      FormatableBitSet  columnToGetSet =
              new FormatableBitSet(SYSCONSTRAINTSRowFactory.SYSCONSTRAINTS_COLUMN_COUNT);
      columnToGetSet.set(columnNum - 1);

      rowTemplate[columnNum - 1] = new SQLChar();
 
      // Scan the index and go to the data pages for qualifying rows
      scanController = tc.openScan(
View Full Code Here

      baseRowLocation = (RowLocationindexTemplateRow.getColumn(
                        indexTemplateRow.nColumns());
 
      /* 1st column is TABLEID (UUID - char(36)) */
      row.setColumn(SYSTABLESRowFactory.SYSTABLES_TABLEID, new SQLChar());
      FormatableBitSet bi = new FormatableBitSet(1);
      bi.set(0);
      boolean base_row_exists =
                heapCC.fetch(
                    baseRowLocation, row.getRowArray(), (FormatableBitSet) null);

            if (SanityManager.DEBUG)
View Full Code Here

                      NumberDataValue newValue,
                      boolean wait)
         throws StandardException
  {

    FormatableBitSet columnToUpdate = new
        FormatableBitSet(SYSCOLUMNSRowFactory.SYSCOLUMNS_COLUMN_COUNT);
      int columnNum = SYSCOLUMNSRowFactory.SYSCOLUMNS_AUTOINCREMENTVALUE;
    TabInfoImpl ti = coreInfo[SYSCOLUMNS_CORE_NUM];
      ConglomerateController heapCC = null;
    SYSCOLUMNSRowFactory  rf = (SYSCOLUMNSRowFactory) ti.getCatalogRowFactory();
    ExecRow row = rf.makeEmptyRow();

      FormatableBitSet  columnToRead = new
        FormatableBitSet(SYSCOLUMNSRowFactory.SYSCOLUMNS_COLUMN_COUNT);
   
    // FormatableBitSet is 0 based.
      columnToRead.set(columnNum - 1); // current value.
    columnToRead.set(columnNum);     // start value.
    columnToRead.set(columnNum + 1); // increment value.

        try
        {
      /* if wait is true then we need to do a wait while trying to
         open/fetch from the conglomerate. note we use wait both to
View Full Code Here

    @return a FormatableBitSet describing the valid columns.
  */
  public static FormatableBitSet getQualifierBitSet(Qualifier[][] qualifiers)
    {
    FormatableBitSet qualifierColumnList = new FormatableBitSet();

    if (qualifiers != null)
        {
      for (int i = 0; i < qualifiers.length; i++)
      {
                for (int j = 0; j < qualifiers[i].length; j++)
                {
                    int colId = qualifiers[i][j].getColumnId();

                    // we are about to set bit colId, need length to be colId+1
                    qualifierColumnList.grow(colId+1);
                    qualifierColumnList.set(colId);
                }
      }
    }

    return qualifierColumnList;
View Full Code Here

      ** the last column number in the array to be the highest
      ** column number.
      */
      sparseRowArray =
        new DataValueDescriptor[changedColumnIds[changedColumnIds.length - 1] + 1];
      changedColumnBitSet = new FormatableBitSet(numberOfColumns);
      for (int i = 0; i < changedColumnIds.length; i++)
      {
        // make sure changedColumnBitSet can accomodate bit
        // changedColumnIds[i] - 1
        changedColumnBitSet.grow(changedColumnIds[i]);
View Full Code Here

     * renamed. Dependency Manager uses this to find out the
     * dependents on the column.
     */
    columnDescriptor = td.getColumnDescriptor(oldObjectName);
    columnPosition = columnDescriptor.getPosition();
    FormatableBitSet toRename = new FormatableBitSet(td.getColumnDescriptorList().size() + 1);
    toRename.set(columnPosition);
    td.setReferencedColumnMap(toRename);
   
    dm.invalidateFor(td, DependencyManager.RENAME, lcc);

    //look for foreign key dependency on the column.
View Full Code Here

   * unnecessarily objectify the stream. beetle 4896.
   */
  private FormatableBitSet checkStreamCols()
  {
    DataValueDescriptor[] cols = row.getRowArray();
    FormatableBitSet streamCols = null;
    for (int i = 0; i < numberOfBaseColumns; i++)
    {
      if (cols[i+numberOfBaseColumns] instanceof StreamStorable//check new values
      {
        if (streamCols == null) streamCols = new FormatableBitSet(numberOfBaseColumns);
        streamCols.set(i);
      }
    }
    return streamCols;
  }
View Full Code Here

    //beetle 3865, update cursor use index.
    TableScanResultSet tableScan = (TableScanResultSet) activation.getForUpdateIndexScan();
    boolean notifyCursor = ((tableScan != null) && ! tableScan.sourceDrained);
    boolean checkStream = (deferred && rowsFound && ! constants.singleRowSource);
    FormatableBitSet streamCols = (checkStream ? checkStreamCols() : null);
    checkStream = (streamCols != null);

        while ( row != null )
        {
View Full Code Here

TOP

Related Classes of org.apache.derby.iapi.services.io.FormatableBitSet

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.