Package nexj.core.meta.upgrade

Examples of nexj.core.meta.upgrade.VersionUpgrade


         new HashTab2D/*<String, Integer, List<Table>>*/(schema.getTableCount());

      if (metadata.isTestEnvironment())
      {
         Upgrade upgrade = metadata.getUpgrade("Main");
         VersionUpgrade version = upgrade.getFirstVersion();
         Lookup/*<Object, UpgradeState>*/ stateMap = Upgrade.getInitialState(version);

         version = findFirstVersion(version, stateMap, (RelationalDatabase)schema.getDataSource());

         for (VersionUpgrade u = version; u != null; u = u.getNext())
View Full Code Here


      StringBuffer buf = new StringBuffer(256);
      SQLAppender outerAppender = m_appender;
      SQLAppender innerAppender = getDynamicSQLAppender(buf);
      Metadata metadata = schema.getMetadata();
      VersionUpgrade firstVersion = (sVersion == null)
                                  ? upgrade.getFirstVersion() : upgrade.getVersion(sVersion);
      Lookup/*<Object, UpgradeState>*/ stateMap = Upgrade.getInitialState(firstVersion);
      SchemaVersion version = new SchemaVersion();

      upgrade.validate(metadata, null);
View Full Code Here

      if (version == null)
      {
         throw new IllegalStateException("Unavailable persistent storage version");
      }

      VersionUpgrade lastUpgrade = upgrade.getVersion(version.getVersion());
      Lookup/*<Object, UpgradeState>*/ stateMap = Upgrade.getInitialState(lastUpgrade);

      version.setUpgradable(true);
      lastUpgrade.apply(Upgrade.getState(stateMap, lastUpgrade)); // advance to finished current ver

      for (VersionUpgrade u = lastUpgrade.getNext(); u != null; u = u.getNext())
      {
         DataSource dataSource = null;
         version.setVersion(u.getName());
         version.setStep(0);

View Full Code Here

   public void testLoad()
   {
      Metadata metadata = getMetadata();
      RelationalSchema schema = (RelationalSchema)m_database.getSchema();
      Table origVersionTable = schema.getVersionTable(); // note original
      VersionUpgrade loadUpgrade = LoadUpgrade.create(metadata.getVersion(), metadata, null, null);
      String sSQL;

      try
      {
         schema.setVersionTable(schema.getTable("Version"));
View Full Code Here

   {
      Upgrade upgrade = getMetadata().getUpgrade("Main");

      upgrade.validate(getMetadata(), null);

      VersionUpgrade firstVersion = upgrade.getFirstVersion();
      Lookup stateMap = Upgrade.getInitialState(firstVersion);
      SchemaVersion version = new SchemaVersion();

      version.setNamespace(getMetadata().getNamespace());
      version.setUpgradable(true);
View Full Code Here

TOP

Related Classes of nexj.core.meta.upgrade.VersionUpgrade

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.