All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.jaxio.jpa.querybyexample.LocaleHolder Maven / Gradle / Ivy

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