|
4 | 4 | */
|
5 | 5 | package org.hibernate.generator;
|
6 | 6 |
|
| 7 | +import java.util.Properties; |
| 8 | + |
7 | 9 | import org.hibernate.Incubating;
|
8 | 10 | import org.hibernate.boot.model.relational.Database;
|
9 | 11 | import org.hibernate.mapping.PersistentClass;
|
|
13 | 15 | import org.hibernate.type.Type;
|
14 | 16 |
|
15 | 17 | /**
|
16 |
| - * An object passed as a parameter to the constructor or |
17 |
| - * {@link AnnotationBasedGenerator#initialize initialize} |
18 |
| - * method of a {@link Generator} which provides access to |
19 |
| - * certain objects useful for initialization of the |
20 |
| - * generator. |
| 18 | + * Access to information useful during {@linkplain Generator} creation and initialization. |
| 19 | + * |
| 20 | + * @see AnnotationBasedGenerator |
| 21 | + * @see org.hibernate.id.Configurable#configure(GeneratorCreationContext, Properties) |
21 | 22 | *
|
22 | 23 | * @since 6.2
|
23 | 24 | */
|
24 | 25 | @Incubating
|
25 | 26 | public interface GeneratorCreationContext {
|
| 27 | + /** |
| 28 | + * View of the relational database objects (tables, sequences, ...) and namespaces (catalogs and schemas). |
| 29 | + */ |
26 | 30 | Database getDatabase();
|
| 31 | + |
| 32 | + /** |
| 33 | + * Access to available services. |
| 34 | + */ |
27 | 35 | ServiceRegistry getServiceRegistry();
|
28 | 36 |
|
| 37 | + /** |
| 38 | + * The default catalog name, if one. |
| 39 | + */ |
29 | 40 | String getDefaultCatalog();
|
| 41 | + |
| 42 | + /** |
| 43 | + * The default schema name, if one. |
| 44 | + */ |
30 | 45 | String getDefaultSchema();
|
31 | 46 |
|
| 47 | + /** |
| 48 | + * Mapping details for the entity. |
| 49 | + */ |
32 | 50 | PersistentClass getPersistentClass();
|
| 51 | + |
| 52 | + /** |
| 53 | + * Mapping details for the root of the {@linkplain #getPersistentClass() entity} hierarchy. |
| 54 | + */ |
33 | 55 | RootClass getRootClass();
|
34 | 56 |
|
| 57 | + /** |
| 58 | + * The entity identifier or id-bag property details. |
| 59 | + */ |
35 | 60 | Property getProperty();
|
| 61 | + |
| 62 | + /** |
| 63 | + * Mapping details for the identifier type. |
| 64 | + */ |
36 | 65 | default Type getType() {
|
37 | 66 | return getProperty().getType();
|
38 | 67 | }
|
|
0 commit comments