Package com.foundationdb.server.error

Examples of com.foundationdb.server.error.InvalidCollationSchemeException


                    if (localeStarted) localeBuilder.append("_");
                    localeStarted = true;
                    localeBuilder.append(pieces[i]);
                } else if (isCaseShortcut(pieces[i])){
                    if (caseSet) {
                        throw new InvalidCollationSchemeException(scheme, "can't set the case sensitivity twice");
                    }
                    caseSensitive = CASE_SENSITIVE.equalsIgnoreCase(pieces[i]);
                    localeFinished = true;
                    caseSet = true;
                } else {
                    if (accentSet) {
                        throw new InvalidCollationSchemeException(scheme, "can't set the accent sensitivity twice");
                    }
                    accentSensitive = ACCENT_SENSITIVE.equalsIgnoreCase(pieces[i]);
                    localeFinished = true;
                    accentSet = true;
                }
            }
            else if (localeFinished) {
                throw new InvalidCollationSchemeException(scheme, "can't define locale after keywords or shortcuts");
            } else {
                if (localeStarted) localeBuilder.append("_");
                localeStarted = true;
                localeBuilder.append(pieces[i]);
            }
View Full Code Here


        }
    }

    private void checkKeywordsAndShortcuts(boolean caseSet, boolean accentSet) {
        if (!keywordsToValues.isEmpty() && (caseSet || accentSet)) {
            throw new InvalidCollationSchemeException(scheme, "can't include both keywords and case/accent shortcuts");
        }
    }
View Full Code Here

    }

    private void addKeyword(String keywordAndValue, String scheme) {
        String[] pieces = keywordAndValue.split("=");
        if (pieces.length != 2) {
            throw new InvalidCollationSchemeException(scheme, "keywords and values must be of the form `keyword=value`");
        }
        keywordsToValues.put(pieces[0], pieces[1]);
    }
View Full Code Here

TOP

Related Classes of com.foundationdb.server.error.InvalidCollationSchemeException

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.