@@ -1141,7 +1141,8 @@ public Object loadFromSecondLevelCache(
1141
1141
* Helper to avoid creating many new instances of {@link PostLoadEvent}.
1142
1142
* It's an allocation hot spot.
1143
1143
*/
1144
- private PostLoadEvent makePostLoadEvent (EntityPersister persister , Object id , Object entity ) {
1144
+ // Hibernate Reactive may need to use this
1145
+ protected PostLoadEvent makePostLoadEvent (EntityPersister persister , Object id , Object entity ) {
1145
1146
final PostLoadEvent event = postLoadEvent ;
1146
1147
if ( event == null ) {
1147
1148
return new PostLoadEvent ( id , persister , entity , this );
@@ -1159,7 +1160,8 @@ private PostLoadEvent makePostLoadEvent(EntityPersister persister, Object id, Ob
1159
1160
* Helper to avoid creating many new instances of {@link LoadEvent}.
1160
1161
* It's an allocation hot spot.
1161
1162
*/
1162
- private LoadEvent makeLoadEvent (String entityName , Object id , Boolean readOnly , LockOptions lockOptions ) {
1163
+ // Hibernate Reactive may need to use this
1164
+ protected LoadEvent makeLoadEvent (String entityName , Object id , Boolean readOnly , LockOptions lockOptions ) {
1163
1165
final LoadEvent event = loadEvent ;
1164
1166
if ( event == null ) {
1165
1167
return new LoadEvent ( id , entityName , lockOptions , this , readOnly );
@@ -1180,7 +1182,8 @@ private LoadEvent makeLoadEvent(String entityName, Object id, Boolean readOnly,
1180
1182
* Helper to avoid creating many new instances of {@link LoadEvent}.
1181
1183
* It's an allocation hot spot.
1182
1184
*/
1183
- private LoadEvent makeLoadEvent (String entityName , Object id , Boolean readOnly , boolean isAssociationFetch ) {
1185
+ // Hibernate Reactive may need to use this
1186
+ protected LoadEvent makeLoadEvent (String entityName , Object id , Boolean readOnly , boolean isAssociationFetch ) {
1184
1187
final LoadEvent event = loadEvent ;
1185
1188
if ( event == null ) {
1186
1189
return new LoadEvent ( id , entityName , isAssociationFetch , this , readOnly );
@@ -1197,7 +1200,8 @@ private LoadEvent makeLoadEvent(String entityName, Object id, Boolean readOnly,
1197
1200
}
1198
1201
}
1199
1202
1200
- private void releasePostLoadEvent (PostLoadEvent event ) {
1203
+ // Hibernate Reactive may need to use this
1204
+ protected void releasePostLoadEvent (PostLoadEvent event ) {
1201
1205
if ( postLoadEvent == null ) {
1202
1206
event .setEntity ( null );
1203
1207
event .setId ( null );
@@ -1206,7 +1210,8 @@ private void releasePostLoadEvent(PostLoadEvent event) {
1206
1210
}
1207
1211
}
1208
1212
1209
- private void releaseLoadEvent (LoadEvent event ) {
1213
+ // Hibernate Reactive may need to use this
1214
+ protected void releaseLoadEvent (LoadEvent event ) {
1210
1215
if ( loadEvent == null ) {
1211
1216
event .setEntityClassName ( null );
1212
1217
event .setEntityId ( null );
@@ -2619,7 +2624,8 @@ public <T> T find(EntityGraph<T> entityGraph, Object primaryKey, FindOption... o
2619
2624
return loadAccess .withLoadGraph ( graph ).load ( primaryKey );
2620
2625
}
2621
2626
2622
- private void checkTransactionNeededForLock (LockMode lockMode ) {
2627
+ // Hibernate Reactive may need to use this
2628
+ protected void checkTransactionNeededForLock (LockMode lockMode ) {
2623
2629
// OPTIMISTIC and OPTIMISTIC_FORCE_INCREMENT require a transaction
2624
2630
// because they involve a version check at the end of the transaction
2625
2631
// All flavors of PESSIMISTIC lock also clearly require a transaction
@@ -2628,7 +2634,8 @@ private void checkTransactionNeededForLock(LockMode lockMode) {
2628
2634
}
2629
2635
}
2630
2636
2631
- private static Boolean readOnlyHint (Map <String , Object > properties ) {
2637
+ // Hibernate Reactive may need to use this
2638
+ protected static Boolean readOnlyHint (Map <String , Object > properties ) {
2632
2639
if ( properties == null ) {
2633
2640
return null ;
2634
2641
}
@@ -3116,7 +3123,8 @@ private void readObject(ObjectInputStream ois) throws IOException, ClassNotFound
3116
3123
eventListenerGroups = getFactory ().getEventListenerGroups ();
3117
3124
}
3118
3125
3119
- private Boolean getReadOnlyFromLoadQueryInfluencers () {
3126
+ // Used by Hibernate reactive
3127
+ protected Boolean getReadOnlyFromLoadQueryInfluencers () {
3120
3128
return loadQueryInfluencers != null ? loadQueryInfluencers .getReadOnly () : null ;
3121
3129
}
3122
3130
}
0 commit comments