Package nexj.core.meta.persistence.sql

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


      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()
         {
            return schema.getTableIterator();
         }
View Full Code Here


      m_table.setViewScript(m_viewScript);
      m_table.setViewAutoUpdated(m_bViewAutoUpdated);
      addAspects(schema, m_table);

      RelationalSchemaAspectManager aspectManager = new RelationalSchemaAspectManager(schema)
      {
         protected Iterator getTableAspectIterator()
         {
            return schema.getTableIterator();
         }

         protected Iterator getTablePointcutIterator()
         {
            return Collections.singletonList(m_table).iterator();
         }

         protected Iterator getIndexAspectIterator()
         {
            return schema.getIndexIterator();
         }

         protected Iterator getIndexPointcutIterator()
         {
            return m_table.getIndexIterator();
         }
      };

      aspectManager.applyAspects(0);

      for (Lookup.Iterator itr = m_indexMap.valueIterator(); itr.hasNext();)
      {
         IndexOutline outline = (IndexOutline)itr.next();
         Index index = new Index(outline.getName(), outline.getType(), m_table);

         outline.copyTo(index);
         m_table.addIndex(index);
      }

      aspectManager.applyAspects(1);

      for (Lookup.Iterator itr = m_indexMap.valueIterator(); itr.hasNext();)
      {
         IndexOutline outline = (IndexOutline)itr.next();
         Index index = m_table.getIndex(outline.getName());

         if (outline.getRelatedTableName() != null)
         {
            schema.getTable(outline.getRelatedTableName()).addRelatedKey(index);
         }
      }

      aspectManager.applyAspects(2);

      if (m_hintList != null)
      {
         for (int i = 0, nCount = m_hintList.size(); i < nCount; ++i)
         {
View Full Code Here

TOP

Related Classes of nexj.core.meta.persistence.sql.RelationalSchemaAspectManager

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.