Package org.conserve.exceptions

Examples of org.conserve.exceptions.IntegrityException


        }
      }
      // sanity check
      if (oldNames.size() != nuNames.size())
      {
        throw new IntegrityException("The number of properties has changed, use updateSchema(...) instead.");
      }
      // iterate over the old names, find matching new name
      for (int oldIndex = 0; oldIndex < oldNames.size(); oldIndex++)
      {
        String oldType = oldTypes.get(oldIndex);
        int nuIndex = nuTypes.indexOf(oldType);
        // make sure there is only one column of this type in both old
        // and new version of object
        if (oldTypes.indexOf(oldType) != oldTypes.lastIndexOf(oldType)
            || nuIndex != nuTypes.lastIndexOf(oldType))
        {
          throw new IntegrityException("More than one changed property of type " + oldType + " in table "
              + tableName);
        }
        // execute schema update
        renameColumn(tableName, oldNames.get(oldIndex), nuNames.get(nuIndex), cw);
      }
View Full Code Here

TOP

Related Classes of org.conserve.exceptions.IntegrityException

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.