Package org.hibernate.boot.model
Interface FunctionContributor
- All Known Implementing Classes:
AbstractTransactSQLDialect,AzureSQLServerDialect,CockroachDB202SpatialDialect,CockroachDialect,DB2Dialect,DB2iDialect,DB2SpatialDialect,DB2zDialect,Dialect,FunctionContributorImpl,GenericDialect,H2Dialect,HANADialect,HANASpatialDialect,HSQLDialect,MariaDBDialect,MySQL56InnoDBSpatialDialect,MySQL56SpatialDialect,MySQL5InnoDBSpatialDialect,MySQL5SpatialDialect,MySQLDialect,MySQLSpatialDialect,OracleDialect,OracleSpatial10gDialect,OracleSpatialSDO10gDialect,PostgisPG10Dialect,PostgisPG93Dialect,PostgisPG94Dialect,PostgisPG95Dialect,PostgresPlusDialect,PostgreSQLDialect,SpannerDialect,SpatialFunctionContributor,SQLServerDialect,SqlServerSpatialDialect,SybaseASEDialect,SybaseDialect
An object that contributes custom HQL functions, eventually to a
SqmFunctionRegistry, via an
instance of FunctionContributions.
-
The most common way to integrate a
FunctionContributoris by making it discoverable via the JavaServiceLoaderfacility. -
Alternatively, a
FunctionContributormay be programmatically supplied toConfiguration.registerFunctionContributor(FunctionContributor)or evenMetadataBuilder.applyFunctions(FunctionContributor).
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidcontributeFunctions(FunctionContributions functionContributions) Contribute functionsdefault intordinal()Determines order in which the contributions will be applied (lowest ordinal first).
-
Method Details
-
contributeFunctions
Contribute functions- Parameters:
functionContributions- The target for the contributions
-
ordinal
default int ordinal()Determines order in which the contributions will be applied (lowest ordinal first).The range 0-500 is reserved for Hibernate, range 500-1000 for libraries and 1000-Integer.MAX_VALUE for user-defined FunctionContributors.
Contributions from higher precedence contributors (higher numbers) effectively override contributions from lower precedence. E.g. if a contributor with precedence 1000 contributes a function named
"max", that will override Hibernate's standard function of that name.- Returns:
- the ordinal for this FunctionContributor
-