org.hibernate.testing.orm.JournalingGenerationTarget Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hibernate-testing Show documentation
Show all versions of hibernate-testing Show documentation
Support for testing Hibernate ORM functionality
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html
*/
package org.hibernate.testing.orm;
import java.util.ArrayList;
import org.hibernate.tool.schema.internal.exec.GenerationTarget;
/**
* @author Steve Ebersole
*/
public class JournalingGenerationTarget implements GenerationTarget {
private final ArrayList commands = new ArrayList<>();
@Override
public void prepare() {
}
@Override
public void accept(String command) {
commands.add( command );
}
public ArrayList getCommands() {
return commands;
}
@Override
public void release() {
}
public void clear() {
commands.clear();
}
}