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

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


        assertEquals(0,nineBits.getNumBitsSet());
        assertTrue(nineBits.invariantHolds());
        assertEquals(2,nineBits.getByteArray().length);
    }
    public void testIntCtorNeg() {
        try { FormatableBitSet negBits = new FormatableBitSet(-1); fail(); }
        catch(IllegalArgumentException iae) {}
    }
View Full Code Here


        catch(IllegalArgumentException iae) {}
    }

    // Test cases for the copy constructor
    public void testEmptyCpyCtor() {
        FormatableBitSet emptyCpy = new FormatableBitSet(empty);
        assertEquals(0,emptyCpy.getLength());
        assertEquals(0,emptyCpy.getLengthInBytes());
        assertEquals(0,emptyCpy.getNumBitsSet());
        assertTrue(emptyCpy.invariantHolds());
    }
View Full Code Here

        assertEquals(0,emptyCpy.getLengthInBytes());
        assertEquals(0,emptyCpy.getNumBitsSet());
        assertTrue(emptyCpy.invariantHolds());
    }
    public void testCpyCtor() {
        FormatableBitSet cpy = new FormatableBitSet(bitset18);
        assertEquals(18,cpy.getLength());
        assertEquals(3,cpy.getLengthInBytes());
        assertEquals(9,cpy.getNumBitsSet());
        assertEquals(0,cpy.compare(bitset18));
        assertTrue(cpy.equals(bitset18));
        assertTrue(cpy.invariantHolds());
        assertEquals(3,cpy.getByteArray().length);
    }
View Full Code Here

    // Test cases for compare(FormatableBitSet)
    public void testCompareSameEmpty() {
        assertEquals(0,empty.compare(empty));
    }
    public void testCompareAnotherEmpty() {
        assertEquals(0,empty.compare(new FormatableBitSet()));
    }
View Full Code Here

    }
    public void testCompare18Empty() {
        // Would expect -1 since empty is smaller than bitset18 (based
        //on documentation)
        //assertEquals(-1,bitset18.compare(new FormatableBitSet()));
        assertEquals(1,bitset18.compare(new FormatableBitSet()));
    }
View Full Code Here

      if (resultColumn != null)
      {
        columnReference.setTableNumber(tableNumber);
        if (tableDescriptor != null)
        {
          FormatableBitSet referencedColumnMap = tableDescriptor.getReferencedColumnMap();
          if (referencedColumnMap == null)
            referencedColumnMap = new FormatableBitSet(
                  tableDescriptor.getNumberOfColumns() + 1);
          referencedColumnMap.set(resultColumn.getColumnPosition());
          tableDescriptor.setReferencedColumnMap(referencedColumnMap);
        }
      }
    }
View Full Code Here

     * NOTE: We need to re-get all of the columns from the heap
     * when doing a bulk fetch because we will be requalifying
     * the row in the IndexRowToBaseRow.
     */
    // Get the BitSet for all of the referenced columns
    FormatableBitSet indexReferencedCols = null;
    FormatableBitSet heapReferencedCols = null;
    if ((bulkFetch == UNSET) &&
      (requalificationRestrictionList == null ||
       requalificationRestrictionList.size() == 0))
    {
      /* No BULK FETCH or requalification, XOR off the columns coming from the heap
View Full Code Here

  Dependable findDependable(DataDictionary dd, UUID dependableObjectID)
    throws StandardException
  {
    TableDescriptor td = dd.getTableDescriptor(dependableObjectID);
    if (td != null// see beetle 4444
      td.setReferencedColumnMap(new FormatableBitSet(columnBitMap));
    return td;
  }
View Full Code Here

        baseColumnPositions =
            indexCD.getIndexDescriptor().baseColumnPositions();
        baseColumns = baseColumnPositions.length;

        FormatableBitSet indexColsBitSet = new FormatableBitSet();
        for (int i = 0; i < baseColumns; i++)
        {
          indexColsBitSet.grow(baseColumnPositions[i]);
          indexColsBitSet.set(baseColumnPositions[i] - 1);
        }

        /* Get one row template for the index scan, and one for the fetch */
        indexRow = ec.getExecutionFactory().getValueRow(baseColumns + 1);

View Full Code Here

      throw T_Fail.testFailMsg("(insertAndFetch) fetch found no row.");
        }

        // Fetch using the fetch partial column interface
        SQLInteger c3 = new SQLInteger(0);
    FormatableBitSet singleColumn = new FormatableBitSet(1);
    singleColumn.set(0);
    DataValueDescriptor[] c3row = new DataValueDescriptor[1];
    c3row[0] = c3;

        if (!cc.fetch(rowloc, c3row, singleColumn))
        {
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.