Package com.facebook.presto.jdbc.internal.joda.time.MutableDateTime

Examples of com.facebook.presto.jdbc.internal.joda.time.MutableDateTime.Property


                }
                Object[] array = innerMap.get(iFieldType);
                if (array == null) {
                    validValues = new HashSet<String>(32);
                    MutableDateTime dt = new MutableDateTime(0L, DateTimeZone.UTC);
                    Property property = dt.property(iFieldType);
                    int min = property.getMinimumValueOverall();
                    int max = property.getMaximumValueOverall();
                    if (max - min > 32) {  // protect against invalid fields
                        return ~position;
                    }
                    maxLength = property.getMaximumTextLength(locale);
                    for (int i = min; i <= max; i++) {
                        property.set(i);
                        validValues.add(property.getAsShortText(locale));
                        validValues.add(property.getAsShortText(locale).toLowerCase(locale));
                        validValues.add(property.getAsShortText(locale).toUpperCase(locale));
                        validValues.add(property.getAsText(locale));
                        validValues.add(property.getAsText(locale).toLowerCase(locale));
                        validValues.add(property.getAsText(locale).toUpperCase(locale));
                    }
                    if ("en".equals(locale.getLanguage()) && iFieldType == DateTimeFieldType.era()) {
                        // hack to support for parsing "BCE" and "CE" if the language is English
                        validValues.add("BCE");
                        validValues.add("bce");
View Full Code Here


            }
            Object[] array = innerMap.get(iFieldType);
            if (array == null) {
                validValues = new ConcurrentHashMap<String, Boolean>(32)// use map as no concurrent Set
                MutableDateTime dt = new MutableDateTime(0L, DateTimeZone.UTC);
                Property property = dt.property(iFieldType);
                int min = property.getMinimumValueOverall();
                int max = property.getMaximumValueOverall();
                if (max - min > 32) {  // protect against invalid fields
                    return ~position;
                }
                maxLength = property.getMaximumTextLength(locale);
                for (int i = min; i <= max; i++) {
                    property.set(i);
                    validValues.put(property.getAsShortText(locale), Boolean.TRUE);
                    validValues.put(property.getAsShortText(locale).toLowerCase(locale), Boolean.TRUE);
                    validValues.put(property.getAsShortText(locale).toUpperCase(locale), Boolean.TRUE);
                    validValues.put(property.getAsText(locale), Boolean.TRUE);
                    validValues.put(property.getAsText(locale).toLowerCase(locale), Boolean.TRUE);
                    validValues.put(property.getAsText(locale).toUpperCase(locale), Boolean.TRUE);
                }
                if ("en".equals(locale.getLanguage()) && iFieldType == DateTimeFieldType.era()) {
                    // hack to support for parsing "BCE" and "CE" if the language is English
                    validValues.put("BCE", Boolean.TRUE);
                    validValues.put("bce", Boolean.TRUE);
View Full Code Here

TOP

Related Classes of com.facebook.presto.jdbc.internal.joda.time.MutableDateTime.Property

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.