-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix a couple of warnings by making StatefulPersistenceContext package…
…-private
- Loading branch information
Showing
7 changed files
with
76 additions
and
27 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
hibernate-core/src/main/java/org/hibernate/engine/internal/PersistenceContexts.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* SPDX-License-Identifier: LGPL-2.1-or-later | ||
* Copyright Red Hat Inc. and Hibernate Authors | ||
*/ | ||
package org.hibernate.engine.internal; | ||
|
||
import org.hibernate.engine.spi.PersistenceContext; | ||
import org.hibernate.engine.spi.SharedSessionContractImplementor; | ||
import org.hibernate.internal.SessionImpl; | ||
|
||
import java.io.IOException; | ||
import java.io.ObjectInputStream; | ||
import java.io.ObjectOutputStream; | ||
|
||
/** | ||
* Operations to instantiate and (de)serialize {@link StatefulPersistenceContext} | ||
* without exposing the class outside this package. | ||
* | ||
* @author Gavin King | ||
*/ | ||
public class PersistenceContexts { | ||
public static PersistenceContext createPersistenceContext(SharedSessionContractImplementor session) { | ||
return new StatefulPersistenceContext( session ); | ||
} | ||
|
||
public static PersistenceContext deserialize(ObjectInputStream ois, SessionImpl session) | ||
throws IOException, ClassNotFoundException { | ||
return StatefulPersistenceContext.deserialize( ois, session ); | ||
} | ||
|
||
public static void serialize(PersistenceContext persistenceContext, ObjectOutputStream oos) | ||
throws IOException { | ||
( (StatefulPersistenceContext) persistenceContext ).serialize( oos ); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters