Search in sources :

Example 1 with DfSynonymExtractor

use of org.dbflute.logic.jdbc.metadata.synonym.DfSynonymExtractor in project dbflute-core by dbflute.

the class DfSchemaXmlSerializer method loadSupplementarySynonymInfoIfNeeds.

// -----------------------------------------------------
// Synonym
// -------
protected void loadSupplementarySynonymInfoIfNeeds() {
    // is only for main schema
    final DfSynonymExtractor extractor = createSynonymExtractor();
    if (extractor == null) {
        return;
    }
    try {
        _log.info("...Loading supplementary synonym informations");
        _supplementarySynonymInfoMap = extractor.extractSynonymMap();
        final StringBuilder sb = new StringBuilder();
        sb.append("Finished loading synonyms:").append(ln()).append("[Supplementary Synonyms]");
        final Set<Entry<String, DfSynonymMeta>> entrySet = _supplementarySynonymInfoMap.entrySet();
        for (Entry<String, DfSynonymMeta> entry : entrySet) {
            sb.append(ln()).append(" ").append(entry.getValue().toString());
        }
        _log.info(sb.toString());
    } catch (RuntimeException ignored) {
        _log.info("DfSynonymExtractor.extractSynonymMap() threw the exception!", ignored);
    }
}
Also used : Entry(java.util.Map.Entry) DfSynonymExtractor(org.dbflute.logic.jdbc.metadata.synonym.DfSynonymExtractor) DfSynonymMeta(org.dbflute.logic.jdbc.metadata.info.DfSynonymMeta)

Aggregations

Entry (java.util.Map.Entry)1 DfSynonymMeta (org.dbflute.logic.jdbc.metadata.info.DfSynonymMeta)1 DfSynonymExtractor (org.dbflute.logic.jdbc.metadata.synonym.DfSynonymExtractor)1