-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
https://hibernate.atlassian.net/browse/HHH-17377 JPA 3.2 B02
- Loading branch information
Showing
12 changed files
with
341 additions
and
319 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
...e-core/src/main/java/org/hibernate/boot/jaxb/cfg/internal/SharedCacheModeMarshalling.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,31 @@ | ||
/* | ||
* Hibernate, Relational Persistence for Idiomatic Java | ||
* | ||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later. | ||
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html. | ||
*/ | ||
package org.hibernate.boot.jaxb.cfg.internal; | ||
|
||
import org.hibernate.internal.util.StringHelper; | ||
|
||
import jakarta.persistence.SharedCacheMode; | ||
import jakarta.persistence.spi.PersistenceUnitTransactionType; | ||
|
||
/** | ||
* @author Steve Ebersole | ||
*/ | ||
public class SharedCacheModeMarshalling { | ||
public static SharedCacheMode fromXml(String name) { | ||
if ( StringHelper.isEmpty( name ) ) { | ||
return SharedCacheMode.UNSPECIFIED; | ||
} | ||
return SharedCacheMode.valueOf( name ); | ||
} | ||
|
||
public static String toXml(SharedCacheMode sharedCacheMode) { | ||
if ( sharedCacheMode == null ) { | ||
return null; | ||
} | ||
return sharedCacheMode.name(); | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
...e-core/src/main/java/org/hibernate/boot/jaxb/cfg/internal/TransactionTypeMarshalling.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,31 @@ | ||
/* | ||
* Hibernate, Relational Persistence for Idiomatic Java | ||
* | ||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later. | ||
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html. | ||
*/ | ||
package org.hibernate.boot.jaxb.cfg.internal; | ||
|
||
import org.hibernate.internal.util.StringHelper; | ||
|
||
import jakarta.persistence.AccessType; | ||
import jakarta.persistence.spi.PersistenceUnitTransactionType; | ||
|
||
/** | ||
* @author Steve Ebersole | ||
*/ | ||
public class TransactionTypeMarshalling { | ||
public static PersistenceUnitTransactionType fromXml(String name) { | ||
if ( StringHelper.isEmpty( name ) ) { | ||
return PersistenceUnitTransactionType.RESOURCE_LOCAL; | ||
} | ||
return PersistenceUnitTransactionType.valueOf( name ); | ||
} | ||
|
||
public static String toXml(PersistenceUnitTransactionType transactionType) { | ||
if ( transactionType == null ) { | ||
return null; | ||
} | ||
return transactionType.name(); | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
...te-core/src/main/java/org/hibernate/boot/jaxb/cfg/internal/ValidationModeMarshalling.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,31 @@ | ||
/* | ||
* Hibernate, Relational Persistence for Idiomatic Java | ||
* | ||
* License: GNU Lesser General Public License (LGPL), version 2.1 or later. | ||
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html. | ||
*/ | ||
package org.hibernate.boot.jaxb.cfg.internal; | ||
|
||
import org.hibernate.internal.util.StringHelper; | ||
|
||
import jakarta.persistence.SharedCacheMode; | ||
import jakarta.persistence.ValidationMode; | ||
|
||
/** | ||
* @author Steve Ebersole | ||
*/ | ||
public class ValidationModeMarshalling { | ||
public static ValidationMode fromXml(String name) { | ||
if ( StringHelper.isEmpty( name ) ) { | ||
return ValidationMode.AUTO; | ||
} | ||
return ValidationMode.valueOf( name ); | ||
} | ||
|
||
public static String toXml(ValidationMode validationMode) { | ||
if ( validationMode == null ) { | ||
return null; | ||
} | ||
return validationMode.name(); | ||
} | ||
} |
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
Oops, something went wrong.