com.jaxio.jpa.querybyexample.LocaleHolder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of javaee7-jpa-query-by-example Show documentation
Show all versions of javaee7-jpa-query-by-example Show documentation
This API allows you to construct Query By Example using the JPA 2 Criteria API.
The newest version!
/*
* Source code generated by Celerio, a Jaxio product.
* Documentation: http://www.jaxio.com/documentation/celerio/
* Follow us on twitter: @jaxiosoft
* Need commercial support ? Contact us: [email protected]
* Template pack-javaee-jpa:src/main/java/context/LocaleHolder.p.vm.java
*/
package com.jaxio.jpa.querybyexample;
import java.util.Locale;
public class LocaleHolder {
private static final ThreadLocal currentLocaleHolder = new ThreadLocal();
public static Locale getLocale() {
Locale locale = currentLocaleHolder.get();
return locale != null ? locale : Locale.getDefault();
}
public static void setLocale(Locale locale) {
currentLocaleHolder.set(locale);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy