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

org.hibernate.boot.model.relational.NamedAuxiliaryDatabaseObject Maven / Gradle / Ivy

There is a newer version: 6.5.0.CR2
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.boot.model.relational;

import java.util.Set;

import org.hibernate.boot.model.naming.Identifier;

/**
 * Mainly this is used to support legacy sequence exporting.
 *
 * @author Steve Ebersole
 *
 * @see org.hibernate.id.SequenceGenerator
 */
public class NamedAuxiliaryDatabaseObject
		extends SimpleAuxiliaryDatabaseObject
		implements Exportable {
	private final String name;

	public NamedAuxiliaryDatabaseObject(
			String name,
			Namespace namespace,
			String createString,
			String dropString,
			Set dialectScopes) {
		super( namespace, createString, dropString, dialectScopes );
		this.name = name;
	}

	public NamedAuxiliaryDatabaseObject(
			String name,
			Namespace namespace,
			String[] createStrings,
			String[] dropStrings,
			Set dialectScopes) {
		super( namespace, createStrings, dropStrings, dialectScopes );
		this.name = name;
	}

	@Override
	public String getExportIdentifier() {
		return new QualifiedNameImpl(
				Identifier.toIdentifier( getCatalogName() ),
				Identifier.toIdentifier( getSchemaName() ),
				Identifier.toIdentifier( name )
		).render();
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy