本文整理了Java中liquibase.Liquibase.setChangeLogParameter()
方法的一些代码示例,展示了Liquibase.setChangeLogParameter()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Liquibase.setChangeLogParameter()
方法的具体详情如下:
包路径:liquibase.Liquibase
类名称:Liquibase
方法名:setChangeLogParameter
暂无
代码示例来源:origin: OpenClinica/OpenClinica
protected Liquibase createLiquibase(Connection c) throws LiquibaseException {
CustomSpringLiquibase.SpringResourceOpener resourceAccessor = this.createResourceOpener();
Liquibase liquibase = new Liquibase(this.getChangeLog(), resourceAccessor, this.createDatabase(c, resourceAccessor));
liquibase.setIgnoreClasspathPrefix(this.isIgnoreClasspathPrefix());
if (this.parameters != null) {
Iterator i$ = this.parameters.entrySet().iterator();
while(i$.hasNext()) {
Entry<String, String> entry = (Entry)i$.next();
liquibase.setChangeLogParameter((String)entry.getKey(), entry.getValue());
}
}
if (this.isDropFirst()) {
liquibase.dropAll();
}
return liquibase;
}
代码示例来源:origin: org.liquibase/liquibase-cdi
protected Liquibase createLiquibase(Connection c) throws LiquibaseException {
Liquibase liquibase = new Liquibase(config.getChangeLog(), resourceAccessor, createDatabase(c));
if (config.getParameters() != null) {
for(Map.Entry<String, String> entry: config.getParameters().entrySet()) {
liquibase.setChangeLogParameter(entry.getKey(), entry.getValue());
}
}
if (config.isDropFirst()) {
liquibase.dropAll();
}
return liquibase;
}
代码示例来源:origin: org.opennms.core/org.opennms.core.schema
/**
* <p>migrate</p>
*
* @param migration a {@link org.opennms.core.schema.Migration} object.
* @throws org.opennms.core.schema.MigrationException if any.
*/
public void migrate(final Migration migration) throws MigrationException {
Connection connection = null;
DatabaseConnection dbConnection = null;
try {
connection = m_dataSource.getConnection();
dbConnection = new JdbcConnection(connection);
ResourceAccessor accessor = migration.getAccessor();
if (accessor == null) accessor = new SpringResourceAccessor();
final Liquibase liquibase = new Liquibase( migration.getChangeLog(), accessor, dbConnection );
liquibase.setChangeLogParameter("install.database.admin.user", migration.getAdminUser());
liquibase.setChangeLogParameter("install.database.admin.password", migration.getAdminPassword());
liquibase.setChangeLogParameter("install.database.user", migration.getDatabaseUser());
liquibase.getDatabase().setDefaultSchemaName(migration.getSchemaName());
final String contexts = System.getProperty("opennms.contexts", "production");
liquibase.update(contexts);
} catch (final Throwable e) {
throw new MigrationException("unable to migrate the database", e);
} finally {
cleanUpDatabase(connection, dbConnection, null, null);
}
}
代码示例来源:origin: OpenNMS/opennms
/**
* <p>migrate</p>
*
* @param migration a {@link org.opennms.core.schema.Migration} object.
* @throws org.opennms.core.schema.MigrationException if any.
*/
public void migrate(final Migration migration) throws MigrationException {
Connection connection = null;
DatabaseConnection dbConnection = null;
try {
connection = m_dataSource.getConnection();
dbConnection = new JdbcConnection(connection);
ResourceAccessor accessor = migration.getAccessor();
if (accessor == null) accessor = new SpringResourceAccessor();
final Liquibase liquibase = new Liquibase( migration.getChangeLog(), accessor, dbConnection );
liquibase.setChangeLogParameter("install.database.admin.user", migration.getAdminUser());
liquibase.setChangeLogParameter("install.database.admin.password", migration.getAdminPassword());
liquibase.setChangeLogParameter("install.database.user", migration.getDatabaseUser());
liquibase.getDatabase().setDefaultSchemaName(migration.getSchemaName());
final String contexts = System.getProperty("opennms.contexts", "production");
liquibase.update(contexts);
} catch (final Throwable e) {
throw new MigrationException("unable to migrate the database", e);
} finally {
cleanUpDatabase(connection, dbConnection, null, null);
}
}
代码示例来源:origin: com.expanset.utils/utils-dbmigration
if (expressionVars != null) {
for (Map.Entry<Object, Object> var : expressionVars.entrySet()) {
liquibase.setChangeLogParameter(var.getKey().toString(), var.getValue());
代码示例来源:origin: com.peterphi.std.guice/stdlib-guice-liquibase
liquibase.setChangeLogParameter(param.getKey(), param.getValue());
代码示例来源:origin: ch.inftec.ju/ju-testing
liquibase.setChangeLogParameter(key, parameters.get(key));
代码示例来源:origin: org.liquibase/liquibase-maven-plugin
this.liquibase.setChangeLogParameter(var.getKey().toString(), var.getValue());
for (Map.Entry var : (Set<Map.Entry>) expressionVariables.entrySet()) {
if (var.getValue() != null) {
this.liquibase.setChangeLogParameter(var.getKey().toString(), var.getValue());
内容来源于网络,如有侵权,请联系作者删除!