Package liquibase.exception

Examples of liquibase.exception.UnexpectedLiquibaseException


            final DiffResult diffResult = DiffGeneratorFactory.getInstance().compare(referenceSnapshot, comparisonSnapshot, compareControl);

            changeLogWriter.setDiffResult(diffResult);
            changeLogWriter.print(outputStream);
        } catch (InvalidExampleException e) {
            throw new UnexpectedLiquibaseException(e);
        }
    }
View Full Code Here


      if ("T".equals(trim)) {
        return true;
      } else if ("F".equals(trim) || StringUtils.isEmpty((String) value) || "0".equals(trim)) {
        return false;
      } else {
        throw new UnexpectedLiquibaseException("Unknown boolean value: " + value);
      }
    } else if (value == null) {
      return false;
    } else if (value instanceof Integer) {
      return !(Integer.valueOf(0).equals(value));
View Full Code Here

      if ("T".equals(trim)) {
        return booleanType.getTrueBooleanValue();
      } else if ("F".equals(trim) || StringUtils.isEmpty((String) value) || "0".equals(trim)) {
        return booleanType.getFalseBooleanValue();
      } else {
        throw new UnexpectedLiquibaseException("Unknown boolean value: " + value);
      }
    } else if (value instanceof Integer) {
      if (Integer.valueOf(1).equals(value)) {
        returnValue = booleanType.getTrueBooleanValue();
      } else {
View Full Code Here

    InetAddress localHost;
    try {
      localHost = NetUtil.getLocalHost();
    } catch (Exception e) {
      throw new UnexpectedLiquibaseException(e);
    }

    UpdateStatement updateStatement = new UpdateStatement(liquibaseSchema,
            database.getDatabaseChangeLogLockTableName());
    updateStatement.addNewColumnValue("LOCKED", true);
View Full Code Here

            getLog().info("  File: " + propertyFile);
            InputStream is;
            try {
                is = StreamUtil.singleInputStream(propertyFile, fo);
            } catch (IOException e) {
                throw new UnexpectedLiquibaseException(e);
            }
            if (is == null) {
                throw new MojoFailureException("Failed to resolve the properties file.");
            }
            parsePropertiesFile(is);
View Full Code Here

                //noinspection unchecked
                register(clazz);
            }

        } catch (Exception e) {
            throw new UnexpectedLiquibaseException(e);
        }

    }
View Full Code Here

                        @Override
                        public int compare(Class<? extends LiquibaseDataType> o1, Class<? extends LiquibaseDataType> o2) {
                            try {
                                return -1 * new Integer(o1.newInstance().getPriority()).compareTo(o2.newInstance().getPriority());
                            } catch (Exception e) {
                                throw new UnexpectedLiquibaseException(e);
                            }
                        }
                    }));
                }
                registry.get(name).add(dataTypeClass);
            }
        } catch (Exception e) {
            throw new UnexpectedLiquibaseException(e);
        }
    }
View Full Code Here

            Iterator<Class<? extends LiquibaseDataType>> iterator = classes.iterator();
            do {
                try {
                    liquibaseDataType = iterator.next().newInstance();
                } catch (Exception e) {
                    throw new UnexpectedLiquibaseException(e);
                }
            } while ((database != null) && !liquibaseDataType.supports(database) && iterator.hasNext());
        }
        if ((database != null) && !liquibaseDataType.supports(database)) {
            throw new UnexpectedLiquibaseException("Could not find type for "+liquibaseDataType.toString()+" for databaes "+database.getShortName());
        }
        if (liquibaseDataType == null) {
            liquibaseDataType = new UnknownType(dataTypeName);

        }
View Full Code Here

         * Returns the ConfigurationProperty object with the given name. If the property was not defined, an exception is thrown.
         */
        public ConfigurationProperty getProperty(String propertyName) {
            ConfigurationProperty property = properties.get(propertyName);
            if (property == null) {
                throw new UnexpectedLiquibaseException("Unknown property on "+getClass().getName()+": "+propertyName);
            }

            return property;
        }
View Full Code Here

         */
        public <T> T getValue(String propertyName, Class<T> returnType) {
            ConfigurationProperty property = getProperty(propertyName);

            if (!property.getType().isAssignableFrom(returnType)) {
                throw new UnexpectedLiquibaseException("Property "+propertyName+" on "+getClass().getName()+" is of type "+property.getType().getName()+", not "+returnType.getName());
            }

            return (T) property.getValue();
        }
View Full Code Here

TOP

Related Classes of liquibase.exception.UnexpectedLiquibaseException

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.