Interface AuxiliaryDatabaseObject
-
- All Superinterfaces:
Exportable,java.io.Serializable
- All Known Implementing Classes:
AbstractAuxiliaryDatabaseObject,NamedAuxiliaryDatabaseObject,SimpleAuxiliaryDatabaseObject
public interface AuxiliaryDatabaseObject extends Exportable, java.io.Serializable
Auxiliary database objects (i.e., triggers, stored procedures, etc) defined in the mappings. Allows Hibernate to manage their lifecycle as part of creating/dropping the schema.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceAuxiliaryDatabaseObject.ExpandableAdditional, optional interface for AuxiliaryDatabaseObject that want to allow expansion of allowable dialects via mapping.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description booleanappliesToDialect(Dialect dialect)Does this database object apply to the given dialect?booleanbeforeTablesOnCreation()Defines a simple precedence.default java.lang.String[]sqlCreateStrings(SqlStringGenerationContext context)Gets the SQL strings for creating the database object.default java.lang.String[]sqlCreateStrings(Dialect dialect)Deprecated.Hibernate ORM may never call this method, and implementations cannot properly handle default catalogs/schemas.default java.lang.String[]sqlDropStrings(SqlStringGenerationContext context)Gets the SQL strings for dropping the database object.default java.lang.String[]sqlDropStrings(Dialect dialect)Deprecated.Hibernate ORM may never call this method, and implementations cannot properly handle default catalogs/schemas.-
Methods inherited from interface org.hibernate.boot.model.relational.Exportable
getExportIdentifier
-
-
-
-
Method Detail
-
appliesToDialect
boolean appliesToDialect(Dialect dialect)
Does this database object apply to the given dialect?- Parameters:
dialect- The dialect to check against.- Returns:
- True if this database object does apply to the given dialect.
-
beforeTablesOnCreation
boolean beforeTablesOnCreation()
Defines a simple precedence. Should creation of this auxiliary object happen before creation of tables? Iftrue, the auxiliary object creation will happen after any explicit schema creations but before table/sequence creations; iffalse, the auxiliary object creation will happen after explicit schema creations and after table/sequence creations. This precedence is automatically inverted for dropping.- Returns:
trueindicates this object should be created before tables;falseindicates it should be created after.
-
sqlCreateStrings
default java.lang.String[] sqlCreateStrings(SqlStringGenerationContext context)
Gets the SQL strings for creating the database object.- Parameters:
context- A context to help generate the SQL creation strings- Returns:
- the SQL strings for creating the database object.
-
sqlCreateStrings
@Deprecated default java.lang.String[] sqlCreateStrings(Dialect dialect)
Deprecated.Hibernate ORM may never call this method, and implementations cannot properly handle default catalogs/schemas. Call/implementsqlCreateStrings(SqlStringGenerationContext)instead.Gets the SQL strings for creating the database object.- Parameters:
dialect- The dialect for which to generate the SQL creation strings- Returns:
- the SQL strings for creating the database object.
-
sqlDropStrings
default java.lang.String[] sqlDropStrings(SqlStringGenerationContext context)
Gets the SQL strings for dropping the database object.- Parameters:
context- A context to help generate the SQL drop strings- Returns:
- the SQL strings for dropping the database object.
-
sqlDropStrings
@Deprecated default java.lang.String[] sqlDropStrings(Dialect dialect)
Deprecated.Hibernate ORM may never call this method, and implementations cannot properly handle default catalogs/schemas. Call/implementsqlDropStrings(SqlStringGenerationContext)instead.Gets the SQL strings for dropping the database object.- Parameters:
dialect- The dialect for which to generate the SQL drop strings- Returns:
- the SQL strings for dropping the database object.
-
-