Search in sources :

Example 6 with DfDocumentProperties

use of org.dbflute.properties.DfDocumentProperties in project dbflute-core by dbflute.

the class Column method getCommentForSchemaHtml.

public String getCommentForSchemaHtml() {
    final DfDocumentProperties prop = getProperties().getDocumentProperties();
    final String comment = prop.resolveTextForSchemaHtml(getComment());
    return comment != null ? comment : "";
}
Also used : DfDocumentProperties(org.dbflute.properties.DfDocumentProperties)

Example 7 with DfDocumentProperties

use of org.dbflute.properties.DfDocumentProperties in project dbflute-core by dbflute.

the class Column method getIndexTitleForSchemaHtml.

public String getIndexTitleForSchemaHtml() {
    if (!hasIndex()) {
        return "";
    }
    final StringBuilder sb = new StringBuilder();
    final List<Index> indexList = getTable().getIndexList();
    for (Index index : indexList) {
        if (!index.hasSameColumn(this)) {
            continue;
        }
        final String indexName = index.getName();
        sb.append(sb.length() > 0 ? ", " : "");
        if (indexName != null && indexName.trim().length() > 0) {
            sb.append(indexName).append("(");
        } else {
            sb.append("(");
        }
        final Map<Integer, String> indexColumnMap = index.getIndexColumnMap();
        final Set<Entry<Integer, String>> entrySet = indexColumnMap.entrySet();
        final StringBuilder oneIndexSb = new StringBuilder();
        for (Entry<Integer, String> entry : entrySet) {
            final String columnName = entry.getValue();
            if (oneIndexSb.length() > 0) {
                oneIndexSb.append(", ");
            }
            oneIndexSb.append(columnName);
        }
        sb.append(oneIndexSb);
        sb.append(")");
    }
    final DfDocumentProperties prop = getProperties().getDocumentProperties();
    final String title = prop.resolveAttributeForSchemaHtml(sb.toString());
    return title != null ? " title=\"" + title + "\"" : "";
}
Also used : Entry(java.util.Map.Entry) DfDocumentProperties(org.dbflute.properties.DfDocumentProperties)

Example 8 with DfDocumentProperties

use of org.dbflute.properties.DfDocumentProperties in project dbflute-core by dbflute.

the class Column method getComment.

public String getComment() {
    final DfDocumentProperties prop = getProperties().getDocumentProperties();
    final String comment = prop.extractCommentFromDbComment(_plainComment);
    return comment != null ? comment : "";
}
Also used : DfDocumentProperties(org.dbflute.properties.DfDocumentProperties)

Example 9 with DfDocumentProperties

use of org.dbflute.properties.DfDocumentProperties in project dbflute-core by dbflute.

the class Column method getCommentForSchemaHtmlPre.

public String getCommentForSchemaHtmlPre() {
    final DfDocumentProperties prop = getProperties().getDocumentProperties();
    final String comment = prop.resolvePreTextForSchemaHtml(getComment());
    return comment != null ? comment : "";
}
Also used : DfDocumentProperties(org.dbflute.properties.DfDocumentProperties)

Example 10 with DfDocumentProperties

use of org.dbflute.properties.DfDocumentProperties in project dbflute-core by dbflute.

the class Column method getCommentForDBMetaSettingExpression.

public String getCommentForDBMetaSettingExpression() {
    if (!isCommentForDBMetaValid()) {
        return "null";
    }
    final DfDocumentProperties prop = getProperties().getDocumentProperties();
    final String comment = prop.resolveTextForDBMeta(getComment());
    return comment != null ? "\"" + comment + "\"" : "null";
}
Also used : DfDocumentProperties(org.dbflute.properties.DfDocumentProperties)

Aggregations

DfDocumentProperties (org.dbflute.properties.DfDocumentProperties)34 DfSchemaHtmlBuilder (org.dbflute.logic.doc.schemahtml.DfSchemaHtmlBuilder)4 Map (java.util.Map)3 DfColumnListToStringBuilder (org.dbflute.logic.generate.column.DfColumnListToStringBuilder)3 Entry (java.util.Map.Entry)2 BufferedReader (java.io.BufferedReader)1 BufferedWriter (java.io.BufferedWriter)1 FileInputStream (java.io.FileInputStream)1 FileNotFoundException (java.io.FileNotFoundException)1 FileOutputStream (java.io.FileOutputStream)1 IOException (java.io.IOException)1 InputStreamReader (java.io.InputStreamReader)1 OutputStreamWriter (java.io.OutputStreamWriter)1 UnsupportedEncodingException (java.io.UnsupportedEncodingException)1 BigDecimal (java.math.BigDecimal)1 DfBuildProperties (org.dbflute.DfBuildProperties)1 JavaPropertiesProperty (org.dbflute.helper.jprop.JavaPropertiesProperty)1 DfLanguageDependency (org.dbflute.logic.generate.language.DfLanguageDependency)1 DfLanguageGrammar (org.dbflute.logic.generate.language.grammar.DfLanguageGrammar)1 DfBasicProperties (org.dbflute.properties.DfBasicProperties)1