Package nexj.core.meta.persistence.sql

Examples of nexj.core.meta.persistence.sql.Table.addIndex()


      table.setName("test"); // table name required to add table to schema, to add index to schema
      schema.addTable(table);
      column.setType(Primitive.INTEGER);
      table.addColumn(column);
      index.addIndexColumn(new IndexColumn(column, true));
      table.addIndex(index);
      table.setPrimaryKey(index);
      schema.setDataSource(m_database);

      // validate initial schema state
      assertEquals(1, schema.getIndexCount());
View Full Code Here


      final RelationalSchema schema = state.getSchema();
      final Table table = schema.getTable(m_sTableName);

      m_index = new Index(m_outline.getName(), m_outline.getType(), table);
      m_outline.copyTo(m_index);
      table.addIndex(m_index);

      new RelationalSchemaAspectManager(schema)
      {
         protected Iterator getTableAspectIterator()
         {
View Full Code Here

               if (pointcut.hasAspect(table))
               {
                  Index index = new Index(m_index.getName(pointcut), m_outline.getType(), table);

                  m_outline.copyTo(index);
                  pointcut.addIndex(index);

                  if (m_outline.getRelatedTableName() != null)
                  {
                     schema.getTable(m_outline.getRelatedTableName()).addRelatedKey(index);
                  }
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.