1 21 package oracle.toplink.essentials.internal.ejb.cmp3.xml; 23 24 import oracle.toplink.essentials.logging.SessionLog; 25 import oracle.toplink.essentials.internal.sessions.AbstractSession; 26 import oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataLogger; 27 28 34 public class XMLLogger extends MetadataLogger { 35 public static final String IGNORE_SECONDARY_TABLE = "orm_warning_ignore_secondary_table"; 37 public static final String IGNORE_MAPPING_ON_WRITE = "orm_warning_ignore_mapping_on_write"; 38 public static final String IGNORE_QUERY_HINT_UNKNOWN_TYPE = "orm_warning_ignore_query_hint_unknown_type"; 39 public static final String IGNORE_QUERY_HINT_UNSUPPORTED_TYPE = "orm_warning_ignore_query_hint_unsupported_type"; 40 public static final String ERROR_LOADING_ORM_XML_FILE = "orm_warning_exception_loading_orm_xml_file"; 41 public static final String COULD_NOT_FIND_ORM_XML_FILE = "orm_could_not_find_orm_xml_file"; 42 45 public XMLLogger(AbstractSession session) { 46 super(session); 47 } 48 49 53 protected void initSharedContextStrings() { 54 IGNORE_TABLE = "orm_warning_ignore_table"; 55 IGNORE_QUERY = "orm_warning_ignore_query"; 56 IGNORE_MAPPING = "orm_warning_ignore_mapping"; 57 IGNORE_ID_CLASS = "orm_warning_ignore_id_class"; 58 IGNORE_PRIMARY_KEY = "orm_warning_ignore_primary_key"; 59 IGNORE_EMBEDDED_ID = "orm_warning_ignore_embedded_id"; 60 IGNORE_INHERITANCE = "orm_warning_ignore_inheritance"; 61 IGNORE_VERSION_LOCKING = "orm_warning_ignore_version_locking"; 62 } 63 64 68 public void log(int level, String ctx, Object [] params) { 69 session.log(level, SessionLog.EJB_ORM, getLoggingContextString(ctx), params); 70 } 71 72 76 protected void populateContextStrings() { 77 super.populateContextStrings(); 78 79 ctxStrings.put(IGNORE_SECONDARY_TABLE, IGNORE_SECONDARY_TABLE); 80 ctxStrings.put(IGNORE_MAPPING_ON_WRITE, IGNORE_MAPPING_ON_WRITE); 81 ctxStrings.put(IGNORE_QUERY_HINT_UNSUPPORTED_TYPE, IGNORE_QUERY_HINT_UNSUPPORTED_TYPE); 82 ctxStrings.put(IGNORE_QUERY_HINT_UNKNOWN_TYPE, IGNORE_QUERY_HINT_UNKNOWN_TYPE); 83 ctxStrings.put(ERROR_LOADING_ORM_XML_FILE, ERROR_LOADING_ORM_XML_FILE); 84 ctxStrings.put(COULD_NOT_FIND_ORM_XML_FILE, COULD_NOT_FIND_ORM_XML_FILE); 85 } 86 } 87 | Popular Tags |