Examples of Index


Examples of net.sf.jsqlparser.statement.create.table.Index

      }

      for (Iterator iter = createTable.getIndexes().iterator(); iter.hasNext();) {
        buffer.append(",\n");
        Index index = (Index) iter.next();
        buffer.append(index.getType() + " " + index.getName());
        buffer.append("(");
        for (Iterator iterator = index.getColumnsNames().iterator(); iterator.hasNext();) {
          buffer.append((String) iterator.next());
          if (iterator.hasNext()) {
            buffer.append(", ");
          }
        }
View Full Code Here

Examples of net.sf.laja.parser.engine2.Index

    return String.valueOf(characters, index++, len);
  }

  @Override
  public Index getIndex(int bookmark) {
    return new Index(bookmark, index);
  }
View Full Code Here

Examples of net.sf.minuteProject.configuration.bean.model.data.Index

  }

  private Index[] getIndexDDLUtils(org.apache.ddlutils.model.Index [] indices) {
    List<Index> returnIndices = new ArrayList<Index>();
    for (int i = 0; i < indices.length; i++) {
      Index index = new IndexDDLUtils(indices[i], this);
      returnIndices.add(index);
    }
    return (Index[])returnIndices.toArray(new Index[returnIndices.size()]);
  }
View Full Code Here

Examples of net.yacy.kelondro.index.Index

            final File path,
            final String tablename,
            final boolean useTailCache,
            final boolean exceed134217727) {
        this.location = path;
        Index backupIndex = null;
        try {
            backupIndex = new SplitTable(this.location, tablename, URIMetadataRow.rowdef, useTailCache, exceed134217727);
        } catch (RowSpaceExceededException e) {
            try {
                backupIndex = new SplitTable(this.location, tablename, URIMetadataRow.rowdef, false, exceed134217727);
View Full Code Here

Examples of nexj.core.meta.persistence.sql.Index

         }
      }

      buf.append(" where ");

      Index pk = m_table.getPrimaryKey();

      nCount = pk.getIndexColumnCount();

      for (int i = 0; i < nCount; ++i)
      {
         if (i > 0)
         {
            buf.append(" and ");
         }

         buf.append(pk.getIndexColumn(i).getColumn().getQuotedName());
         buf.append(" = ");
         m_adapter.appendBind(buf, nValCount++);
      }

      if (m_lockingColumn != null)
      {
         buf.append(" and ");
         buf.append(m_lockingColumn.getQuotedName());
         buf.append(" = ");
         m_adapter.appendBind(buf, nValCount++);
      }

      if (bPrimary)
      {
         if (((RelationalMapping)m_mapping).getKeyGenerator() == null)
         {
            for (int i = 0; i < nCount; ++i)
            {
               if (getValue(pk.getIndexColumn(i).getColumn()) != Undefined.VALUE)
               {
                  m_bKeyChanged = true;
                  break;
               }
            }
View Full Code Here

Examples of opennlp.tools.dictionary.Index

   *
   * @param dictionary
   */
  public DictionaryNameFinder(Dictionary dictionary) {
    mDictionary = dictionary;
    mMetaDictionary = new Index(dictionary.iterator());
  }
View Full Code Here

Examples of oracle.kv.table.Index

    {
        // search using index on pkey column
        List<E> foreignKeys = new ArrayList<E>();

        Table schemaTable = tableAPI.getTable(tableName);
        Index index = schemaTable.getIndex(pKeyColumnName);
        IndexKey indexKey = index.createIndexKey();

        // StringBuilder indexNamebuilder = new StringBuilder();
        NoSqlDBUtils.add(schemaTable.getField(pKeyColumnName), indexKey, pKeyColumnValue, pKeyColumnName);
        KunderaCoreUtils.printQuery("Get columns by id from:" + tableName + " for column:" + columnName
                + " where value:" + pKeyColumnValue, showQuery);
View Full Code Here

Examples of org.apache.cocoon.components.search.Index

        if (id == null || id.equals("")) {
            throw new IndexException(" index with no name was called");
        }

        Index index = (Index) this.indexes().get(id);
        if (index == null) {
            throw new IndexException("Index " + id + " doesn't exist. Check if configuration "
                    + INDEX_CONF_FILE + " exists for this publication!");
        }
View Full Code Here

Examples of org.apache.ddlutils.model.Index

            }
        }

        for (int indexIdx = 0; indexIdx < sourceTable.getIndexCount(); indexIdx++)
        {
            Index sourceIndex = sourceTable.getIndex(indexIdx);
            Index targetIndex = findCorrespondingIndex(targetTable, sourceIndex);

            if (targetIndex == null)
            {
                if (_log.isInfoEnabled())
                {
                    _log.info("Index " + sourceIndex.getName() + " needs to be removed from table " + sourceTable.getName());
                }
                changes.add(new RemoveIndexChange(sourceTable, sourceIndex));
            }
        }
        for (int indexIdx = 0; indexIdx < targetTable.getIndexCount(); indexIdx++)
        {
            Index targetIndex = targetTable.getIndex(indexIdx);
            Index sourceIndex = findCorrespondingIndex(sourceTable, targetIndex);

            if (sourceIndex == null)
            {
                if (_log.isInfoEnabled())
                {
View Full Code Here

Examples of org.apache.directory.server.xdbm.Index


    @Test
    public void testSubLevelIndex() throws Exception
    {
        Index idx = store.getSubLevelIndex();

        assertEquals( 19, idx.count() );

        Cursor<IndexEntry<Long, Attributes, Long>> cursor = idx.forwardCursor( 2L );

        assertTrue( cursor.next() );
        assertEquals( 2, ( long ) cursor.get().getId() );

        assertTrue( cursor.next() );
        assertEquals( 5, ( long ) cursor.get().getId() );

        assertTrue( cursor.next() );
        assertEquals( 6, ( long ) cursor.get().getId() );

        assertFalse( cursor.next() );

        idx.drop( 5L );

        cursor = idx.forwardCursor( 2L );

        assertTrue( cursor.next() );
        assertEquals( 2, ( long ) cursor.get().getId() );

        assertTrue( cursor.next() );
        assertEquals( 6, ( long ) cursor.get().getId() );

        assertFalse( cursor.next() );

        // dn id 12
        DN martinDn = new DN( "cn=Marting King,ou=Sales,o=Good Times Co." );
        martinDn.normalize( schemaManager.getNormalizerMapping() );
        DefaultServerEntry entry = new DefaultServerEntry( schemaManager, martinDn );
        entry.add( "objectClass", "top", "person", "organizationalPerson" );
        entry.add( "ou", "Sales" );
        entry.add( "cn", "Martin King" );
        entry.add( "entryCSN", new CsnFactory( 1 ).newInstance().toString() );
        entry.add( "entryUUID", UUID.randomUUID().toString() );
        store.add( entry );

        cursor = idx.forwardCursor( 2L );
        cursor.afterLast();
        assertTrue( cursor.previous() );
        assertEquals( 12, ( long ) cursor.get().getId() );

        DN newParentDn = new DN( "ou=Board of Directors,o=Good Times Co." );
        newParentDn.normalize( schemaManager.getNormalizerMapping() );

        store.move( martinDn, newParentDn );
        cursor = idx.forwardCursor( 3L );
        cursor.afterLast();
        assertTrue( cursor.previous() );
        assertEquals( 12, ( long ) cursor.get().getId() );

        // dn id 13
        DN marketingDn = new DN( "ou=Marketing,ou=Sales,o=Good Times Co." );
        marketingDn.normalize( schemaManager.getNormalizerMapping() );
        entry = new DefaultServerEntry( schemaManager, marketingDn );
        entry.add( "objectClass", "top", "organizationalUnit" );
        entry.add( "ou", "Marketing" );
        entry.add( "entryCSN", new CsnFactory( 1 ).newInstance().toString() );
        entry.add( "entryUUID", UUID.randomUUID().toString() );
        store.add( entry );

        // dn id 14
        DN jimmyDn = new DN( "cn=Jimmy Wales,ou=Marketing, ou=Sales,o=Good Times Co." );
        jimmyDn.normalize( schemaManager.getNormalizerMapping() );
        entry = new DefaultServerEntry( schemaManager, jimmyDn );
        entry.add( "objectClass", "top", "person", "organizationalPerson" );
        entry.add( "ou", "Marketing" );
        entry.add( "cn", "Jimmy Wales" );
        entry.add( "entryCSN", new CsnFactory( 1 ).newInstance().toString() );
        entry.add( "entryUUID", UUID.randomUUID().toString() );
        store.add( entry );

        store.move( marketingDn, newParentDn );

        cursor = idx.forwardCursor( 3L );
        cursor.afterLast();

        assertTrue( cursor.previous() );
        assertEquals( 14, ( long ) cursor.get().getId() );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.