FileDocCategorySizeDatePackage
SimpleAuxiliaryDatabaseObject.javaAPI DocHibernate 3.2.51924Wed Aug 10 07:13:00 BST 2005org.hibernate.mapping

SimpleAuxiliaryDatabaseObject

public class SimpleAuxiliaryDatabaseObject extends AbstractAuxiliaryDatabaseObject
A simple implementation of AbstractAuxiliaryDatabaseObject in which the CREATE and DROP strings are provided up front. Contains simple facilities for templating the catalog and schema names into the provided strings.

This is the form created when the mapping documents use <create/> and <drop/>.

author
Steve Ebersole

Fields Summary
private final String
sqlCreateString
private final String
sqlDropString
Constructors Summary
public SimpleAuxiliaryDatabaseObject(String sqlCreateString, String sqlDropString)

		this.sqlCreateString = sqlCreateString;
		this.sqlDropString = sqlDropString;
	
public SimpleAuxiliaryDatabaseObject(String sqlCreateString, String sqlDropString, HashSet dialectScopes)

		super( dialectScopes );
		this.sqlCreateString = sqlCreateString;
		this.sqlDropString = sqlDropString;
	
Methods Summary
private java.lang.StringinjectCatalogAndSchema(java.lang.String ddlString, java.lang.String defaultCatalog, java.lang.String defaultSchema)

		String rtn = StringHelper.replace( ddlString, "${catalog}", defaultCatalog );
		rtn = StringHelper.replace( rtn, "${schema}", defaultSchema );
		return rtn;
	
public java.lang.StringsqlCreateString(org.hibernate.dialect.Dialect dialect, org.hibernate.engine.Mapping p, java.lang.String defaultCatalog, java.lang.String defaultSchema)

		return injectCatalogAndSchema( sqlCreateString, defaultCatalog, defaultSchema );
	
public java.lang.StringsqlDropString(org.hibernate.dialect.Dialect dialect, java.lang.String defaultCatalog, java.lang.String defaultSchema)

		return injectCatalogAndSchema( sqlDropString, defaultCatalog, defaultSchema );