52
52
*/
53
53
public interface SessionFactoryImplementor extends MappingContext , SessionFactory {
54
54
/**
55
- * Get the UUID for this {@code SessionFactory}.
55
+ * The UUID assigned to this {@code SessionFactory}.
56
56
* <p>
57
- * The value is generated as a {@link java.util.UUID}, but kept as a String.
58
- *
59
- * @return The UUID for this {@code SessionFactory}.
57
+ * The value is generated as a {@link java.util.UUID}, but kept as a string.
60
58
*
61
59
* @see org.hibernate.internal.SessionFactoryRegistry#getSessionFactory
62
60
*/
63
61
String getUuid ();
64
62
65
- /**
66
- * Access to the name (if one) assigned to the {@code SessionFactory}
67
- *
68
- * @return The name for the {@code SessionFactory}
69
- */
70
- @ Override
71
- String getName ();
72
-
73
63
/**
74
64
* Overrides {@link SessionFactory#openSession()} to widen the return type:
75
65
* this is useful for internal code depending on {@link SessionFactoryImplementor}
@@ -80,34 +70,65 @@ public interface SessionFactoryImplementor extends MappingContext, SessionFactor
80
70
@ Override
81
71
SessionImplementor openSession ();
82
72
73
+ /**
74
+ * Obtain a {@linkplain org.hibernate.SessionBuilder session builder}
75
+ * for creating new instances of {@link org.hibernate.Session} with
76
+ * certain customized options.
77
+ */
83
78
@ Override
84
79
SessionBuilderImplementor withOptions ();
85
80
86
81
/**
87
- * Get a non-transactional "current" session (used by hibernate-envers)
82
+ * Get a non-transactional "current" session.
83
+ *
84
+ * @apiNote This is used by {@code hibernate-envers}.
88
85
*/
89
86
SessionImplementor openTemporarySession ();
90
87
88
+ /**
89
+ * Obtain the {@link CacheImplementor}.
90
+ */
91
91
@ Override
92
92
CacheImplementor getCache ();
93
93
94
+ /**
95
+ * Obtain the {@link StatisticsImplementor}.
96
+ */
94
97
@ Override
95
98
StatisticsImplementor getStatistics ();
96
99
100
+ /**
101
+ * Obtain the {@link TypeConfiguration}
102
+ */
97
103
TypeConfiguration getTypeConfiguration ();
98
104
105
+ /**
106
+ * Obtain the {@link RuntimeMetamodelsImplementor}
107
+ */
99
108
RuntimeMetamodelsImplementor getRuntimeMetamodels ();
100
109
110
+ /**
111
+ * Obtain the {@link MappingMetamodelImplementor}
112
+ */
101
113
default MappingMetamodelImplementor getMappingMetamodel () {
102
114
return getRuntimeMetamodels ().getMappingMetamodel ();
103
115
}
104
116
117
+ /**
118
+ * Obtain the {@link JpaMetamodel}
119
+ */
105
120
default JpaMetamodel getJpaMetamodel () {
106
121
return getRuntimeMetamodels ().getJpaMetamodel ();
107
122
}
108
123
124
+ /**
125
+ * Obtain the {@link QueryEngine}
126
+ */
109
127
QueryEngine getQueryEngine ();
110
128
129
+ /**
130
+ * Obtain the {@link SqlTranslationEngine}
131
+ */
111
132
SqlTranslationEngine getSqlTranslationEngine ();
112
133
113
134
/**
@@ -123,11 +144,14 @@ default JpaMetamodel getJpaMetamodel() {
123
144
EventEngine getEventEngine ();
124
145
125
146
/**
126
- * Retrieve fetch profile by name.
147
+ * Retrieve a {@linkplain FetchProfile fetch profile} by name.
127
148
*
128
149
* @param name The name of the profile to retrieve.
129
150
* @return The profile definition
151
+ *
152
+ * @deprecated Use {@link SqlTranslationEngine#getFetchProfile(String)}
130
153
*/
154
+ @ Deprecated (since = "7.0" , forRemoval = true )
131
155
FetchProfile getFetchProfile (String name );
132
156
133
157
/**
@@ -138,62 +162,86 @@ default JpaMetamodel getJpaMetamodel() {
138
162
@ Deprecated (since = "7" , forRemoval = true )
139
163
Generator getGenerator (String rootEntityName );
140
164
165
+ /**
166
+ * Obtain the {@link EntityNotFoundDelegate}
167
+ */
141
168
EntityNotFoundDelegate getEntityNotFoundDelegate ();
142
169
170
+ /**
171
+ * Register a {@link SessionFactoryObserver} of this factory.
172
+ */
143
173
void addObserver (SessionFactoryObserver observer );
144
174
175
+ /**
176
+ * Obtain the {@link CustomEntityDirtinessStrategy}
177
+ */
145
178
//todo make a Service ?
146
179
CustomEntityDirtinessStrategy getCustomEntityDirtinessStrategy ();
147
180
181
+ /**
182
+ * Obtain the {@link CurrentTenantIdentifierResolver}
183
+ */
148
184
//todo make a Service ?
149
185
CurrentTenantIdentifierResolver <Object > getCurrentTenantIdentifierResolver ();
150
186
151
187
/**
152
- * The java type to use for a tenant identifier.
188
+ * The {@link JavaType} to use for a tenant identifier.
153
189
*
154
190
* @since 6.4
155
191
*/
156
192
JavaType <Object > getTenantIdentifierJavaType ();
157
193
158
194
/**
159
- * Access to the event listener groups.
195
+ * Access to the {@linkplain EventListenerGroups event listener groups} .
160
196
*
161
197
* @since 7.0
162
198
*/
163
199
@ Internal @ Incubating
164
200
EventListenerGroups getEventListenerGroups ();
165
201
166
202
/**
203
+ * Obtain the {@link ParameterMarkerStrategy} service.
204
+ *
167
205
* @since 7.0
168
206
*/
169
207
@ Incubating
170
208
ParameterMarkerStrategy getParameterMarkerStrategy ();
171
209
172
210
/**
211
+ * Obtain the {@link JdbcServices} service.
212
+ *
173
213
* @since 7.0
174
214
*/
175
215
@ Incubating
176
216
JdbcValuesMappingProducerProvider getJdbcValuesMappingProducerProvider ();
177
217
178
218
/**
219
+ * Obtain the {@link EntityCopyObserverFactory} service.
220
+ *
179
221
* @since 7.0
180
222
*/
181
223
@ Incubating
182
224
EntityCopyObserverFactory getEntityCopyObserver ();
183
225
184
226
/**
227
+ * Obtain the {@link ClassLoaderService}.
228
+ *
185
229
* @since 7.0
186
230
*/
187
231
@ Incubating
188
232
ClassLoaderService getClassLoaderService ();
189
233
190
234
/**
235
+ * Obtain the {@link ManagedBeanRegistry} service.
236
+ *
191
237
* @since 7.0
192
238
*/
193
239
@ Incubating
194
240
ManagedBeanRegistry getManagedBeanRegistry ();
195
241
196
242
/**
243
+ * Obtain the {@link EventListenerRegistry} service.
244
+ *
197
245
* @since 7.0
198
246
*/
199
247
@ Incubating
@@ -207,16 +255,35 @@ default JpaMetamodel getJpaMetamodel() {
207
255
*/
208
256
WrapperOptions getWrapperOptions ();
209
257
258
+ /**
259
+ * Get the {@linkplain SessionFactoryOptions options} used to build this factory.
260
+ */
210
261
@ Override
211
262
SessionFactoryOptions getSessionFactoryOptions ();
212
263
264
+ /**
265
+ * Obtain the {@linkplain FilterDefinition definition of a filter} by name.
266
+ *
267
+ * @param filterName The name of a declared filter
268
+ */
213
269
@ Override
214
270
FilterDefinition getFilterDefinition (String filterName );
215
271
272
+ /**
273
+ * Obtain a collection of {@link FilterDefinition}s representing all the
274
+ * {@linkplain org.hibernate.annotations.FilterDef#autoEnabled auto-enabled}
275
+ * filters.
276
+ */
216
277
Collection <FilterDefinition > getAutoEnabledFilters ();
217
278
279
+ /**
280
+ * Obtain the {@link JdbcServices} service.
281
+ */
218
282
JdbcServices getJdbcServices ();
219
283
284
+ /**
285
+ * Obtain the {@link SqlStringGenerationContext}.
286
+ */
220
287
SqlStringGenerationContext getSqlStringGenerationContext ();
221
288
222
289
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0 commit comments