Javadoc for GeneratorCreationContext

This commit is contained in:
Steve Ebersole 2024-09-18 08:17:34 -05:00
parent 4fbc8f96ef
commit 9e89bdd85a
1 changed files with 34 additions and 5 deletions

View File

@ -4,6 +4,8 @@
*/ */
package org.hibernate.generator; package org.hibernate.generator;
import java.util.Properties;
import org.hibernate.Incubating; import org.hibernate.Incubating;
import org.hibernate.boot.model.relational.Database; import org.hibernate.boot.model.relational.Database;
import org.hibernate.mapping.PersistentClass; import org.hibernate.mapping.PersistentClass;
@ -13,26 +15,53 @@ import org.hibernate.service.ServiceRegistry;
import org.hibernate.type.Type; import org.hibernate.type.Type;
/** /**
* An object passed as a parameter to the constructor or * Access to information useful during {@linkplain Generator} creation and initialization.
* {@link AnnotationBasedGenerator#initialize initialize} *
* method of a {@link Generator} which provides access to * @see AnnotationBasedGenerator
* certain objects useful for initialization of the * @see org.hibernate.id.Configurable#configure(GeneratorCreationContext, Properties)
* generator.
* *
* @since 6.2 * @since 6.2
*/ */
@Incubating @Incubating
public interface GeneratorCreationContext { public interface GeneratorCreationContext {
/**
* View of the relational database objects (tables, sequences, ...) and namespaces (catalogs and schemas).
*/
Database getDatabase(); Database getDatabase();
/**
* Access to available services.
*/
ServiceRegistry getServiceRegistry(); ServiceRegistry getServiceRegistry();
/**
* The default catalog name, if one.
*/
String getDefaultCatalog(); String getDefaultCatalog();
/**
* The default schema name, if one.
*/
String getDefaultSchema(); String getDefaultSchema();
/**
* Mapping details for the entity.
*/
PersistentClass getPersistentClass(); PersistentClass getPersistentClass();
/**
* Mapping details for the root of the {@linkplain #getPersistentClass() entity} hierarchy.
*/
RootClass getRootClass(); RootClass getRootClass();
/**
* The entity identifier or id-bag property details.
*/
Property getProperty(); Property getProperty();
/**
* Mapping details for the identifier type.
*/
default Type getType() { default Type getType() {
return getProperty().getType(); return getProperty().getType();
} }