Package org.apache.openjpa.lib.log

Examples of org.apache.openjpa.lib.log.Log.warn()


    private void logNoSetter(ClassMetaData meta, String name, Exception e) {
        Log log = meta.getRepository().getConfiguration()
            .getLog(OpenJPAConfiguration.LOG_METADATA);
        if (log.isWarnEnabled())
            log.warn(_loc.get("no-setter-for-getter", name,
                meta.getDescribedType().getName()));
        else if (log.isTraceEnabled())
            // log the exception, if any, if we're in trace-level debugging
            log.warn(_loc.get("no-setter-for-getter", name,
                meta.getDescribedType().getName()), e);
View Full Code Here


        if (log.isWarnEnabled())
            log.warn(_loc.get("no-setter-for-getter", name,
                meta.getDescribedType().getName()));
        else if (log.isTraceEnabled())
            // log the exception, if any, if we're in trace-level debugging
            log.warn(_loc.get("no-setter-for-getter", name,
                meta.getDescribedType().getName()), e);
    }
}
View Full Code Here

        Collection classes;
        if (args.length == 0) {
            log.info(_loc.get("running-all-classes"));
            classes = repos.getPersistentTypeNames(true, loader);
            if (classes == null) {
              log.warn(_loc.get("no-class-to-enhance"));
              return false;
            }
        } else {
            ClassArgParser cap = conf.getMetaDataRepositoryInstance().
                getMetaDataFactory().newClassArgParser();
View Full Code Here

            case JavaTypes.PC:
                if (isEmbedded() &&
                    !opts.contains(conf.OPTION_EMBEDDED_RELATION)) {
                    setEmbedded(false);
                    if (log.isWarnEnabled())
                        log.warn(_loc.get("cant-embed", this));
                } else
                if (isEmbedded() && getDeclaredTypeCode() != JavaTypes.PC) {
                    setEmbedded(false);
                    if (log.isWarnEnabled())
                        log.warn(_loc.get("cant-embed-extern", this));
View Full Code Here

                        log.warn(_loc.get("cant-embed", this));
                } else
                if (isEmbedded() && getDeclaredTypeCode() != JavaTypes.PC) {
                    setEmbedded(false);
                    if (log.isWarnEnabled())
                        log.warn(_loc.get("cant-embed-extern", this));
                }
                break;
            case JavaTypes.COLLECTION:
                if (!opts.contains(conf.OPTION_TYPE_COLLECTION))
                    throw new UnsupportedException(
View Full Code Here

                if (_elem.isEmbeddedPC()
                    && !opts.contains(conf.OPTION_EMBEDDED_COLLECTION_RELATION))
                {
                    _elem.setEmbedded(false);
                    if (log.isWarnEnabled())
                        log.warn(_loc.get("cant-embed-element", this));
                }
                break;
            case JavaTypes.ARRAY:
                if (!opts.contains(conf.OPTION_TYPE_ARRAY))
                    throw new UnsupportedException(
View Full Code Here

                if (_elem.isEmbeddedPC()
                    && !opts.contains(conf.OPTION_EMBEDDED_COLLECTION_RELATION))
                {
                    _elem.setEmbedded(false);
                    if (log.isWarnEnabled())
                        log.warn(_loc.get("cant-embed-element", this));
                }
                break;
            case JavaTypes.MAP:
                if (!opts.contains(conf.OPTION_TYPE_MAP))
                    throw new UnsupportedException(
View Full Code Here

                            "Map", this));
                if (_elem.isEmbeddedPC()
                    && !opts.contains(conf.OPTION_EMBEDDED_MAP_RELATION)) {
                    _elem.setEmbedded(false);
                    if (log.isWarnEnabled())
                        log.warn(_loc.get("cant-embed-element", this));
                }
                if (_key.isEmbeddedPC()
                    && !opts.contains(conf.OPTION_EMBEDDED_MAP_RELATION)) {
                    _key.setEmbedded(false);
                    if (log.isWarnEnabled())
View Full Code Here

                }
                if (_key.isEmbeddedPC()
                    && !opts.contains(conf.OPTION_EMBEDDED_MAP_RELATION)) {
                    _key.setEmbedded(false);
                    if (log.isWarnEnabled())
                        log.warn(_loc.get("cant-embed-key", this));
                }
                break;
        }
    }
View Full Code Here

    }
   
    void warn(ClassMetaData meta, Localizer.Message message) {
      Log log = meta.getRepository().getConfiguration()
    .getLog(OpenJPAConfiguration.LOG_RUNTIME);
      log.warn(message.toString());
    }

    void trace(ClassMetaData meta, Localizer.Message message) {
        Log log = meta.getRepository().getConfiguration()
        .getLog(OpenJPAConfiguration.LOG_RUNTIME);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.