All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hibernate.jpa.internal.schemagen.GenerationSourceFromScript Maven / Gradle / Ivy

There is a newer version: 5.4.2.Final
Show newest version
/*
 * 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 .
 */
package org.hibernate.jpa.internal.schemagen;

import org.hibernate.tool.hbm2ddl.ImportSqlCommandExtractor;

/**
 * Handles schema generation source from a "script"
 *
 * @author Steve Ebersole
 */
public class GenerationSourceFromScript implements GenerationSource {
	private final ScriptSourceInput inputSource;
	private final ImportSqlCommandExtractor scriptCommandExtractor;

	public GenerationSourceFromScript(ScriptSourceInput inputSource, ImportSqlCommandExtractor scriptCommandExtractor) {
		this.inputSource = inputSource;
		this.scriptCommandExtractor = scriptCommandExtractor;
	}

	@Override
	public Iterable getCommands() {
		return inputSource.read( scriptCommandExtractor );
	}

	@Override
	public void release() {
		inputSource.release();
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy