Package org.apache.openjpa.lib.util.Localizer

Examples of org.apache.openjpa.lib.util.Localizer.Message


            col.setType(type);
        } else if ((compat || !ttype) && !col.isCompatible(type, typeName,
            size, decimals)) {
            // if existing column isn't compatible with desired type, die if
            // can't adapt, else warn and change the existing column type
            Message msg = _loc.get(prefix + "-bad-col", context,
                Schemas.getJDBCName(type), col.getDescription());
            if (!adapt)
                throw new MetaDataException(msg);
            Log log = repos.getLog();
            if (log.isWarnEnabled())
View Full Code Here


            warn = _precisionWarnedTypes.add(orig.getClass());
        }

        if (storageLimitationsFatal || (warn && log.isWarnEnabled())
            || (!warn && log.isTraceEnabled())) {
            Message msg = _loc.get("storage-restriction", new Object[]{
                platform,
                orig,
                orig.getClass().getName(),
                converted,
            });
View Full Code Here

            warn = _precisionWarnedTypes.add(orig.getClass());
        }

        if (storageLimitationsFatal || (warn && log.isWarnEnabled())
            || (!warn && log.isTraceEnabled())) {
            Message msg = _loc.get("storage-restriction", new Object[]{
                platform,
                orig,
                orig.getClass().getName(),
                converted,
            });
View Full Code Here

        if (args == null)
            argStr = getLocalizer().get(token).getMessage();
        else
            argStr = getLocalizer().get(token, args).getMessage();

        Message msg = _loc.get("parse-error", argStr, currentQuery());

        switch (e) {
            case EX_FATAL:
                throw new InternalException(msg, nest);
            case EX_UNSUPPORTED:
View Full Code Here

                            + ".prepareUnenhancedClasses()"
                            + " - The following classes are unenhanced "
                            + unenhanced.toString());
                    }
                }
                Message msg = _loc.get("runtime-optimization-disabled", Exceptions.toClassNames(unenhanced));
                if (conf.getRuntimeUnenhancedClassesConstant() == RuntimeUnenhancedClassesModes.WARN) {
                    log.warn(msg);
                } else {
                    throw new UserException(msg);
                }
View Full Code Here

            warn = _precisionWarnedTypes.add(orig.getClass());
        }

        if (storageLimitationsFatal || (warn && log.isWarnEnabled())
            || (!warn && log.isTraceEnabled())) {
            Message msg = _loc.get("storage-restriction", new Object[]{
                platform,
                orig,
                orig.getClass().getName(),
                converted,
            });
View Full Code Here

        if (vm.getEmbeddedMetaData() != null) {
            //throw parseException(EX_USER, "bad-predicate",
            //    new Object[]{ currentQuery() }, null);
            String argStr = _loc.get("bad-predicate",
                new Object[] {fmd.getName()}).getMessage();
            Message msg = _loc.get("parse-error", argStr, currentQuery);
            throw new UserException(msg, null);
        }
    }
View Full Code Here

        for (Iterator itr = _violations.iterator(); itr.hasNext();) {
            buf.append(itr.next());
            if (itr.hasNext())
                buf.append(sep);
        }
        Message msg = _loc.get("property-violations", buf);

        if (_fail)
            throw new UserException(msg);
        if (_log.isWarnEnabled())
            _log.warn(msg);
View Full Code Here

        if (args == null)
            argStr = getLocalizer().get(token).getMessage();
        else
            argStr = getLocalizer().get(token, args).getMessage();

        Message msg = _loc.get("parse-error", argStr, currentQuery());

        switch (e) {
            case EX_FATAL:
                throw new InternalException(msg, nest);
            case EX_UNSUPPORTED:
View Full Code Here

        for (Iterator itr = _violations.iterator(); itr.hasNext();) {
            buf.append(itr.next());
            if (itr.hasNext())
                buf.append(sep);
        }
        Message msg = _loc.get("property-violations", buf);

        if (_fail)
            throw new UserException(msg);
        if (_log.isWarnEnabled())
            _log.warn(msg);
View Full Code Here

TOP

Related Classes of org.apache.openjpa.lib.util.Localizer.Message

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.