Search in sources :

Example 1 with DfSchemaHtmlBuilder

use of org.dbflute.logic.doc.schemahtml.DfSchemaHtmlBuilder in project dbflute-core by dbflute.

the class Table method getReferrerTableNameCommaStringWithHtmlHref.

public String getReferrerTableNameCommaStringWithHtmlHref() {
    // for SchemaHTML
    final StringBuilder sb = new StringBuilder();
    final DfDocumentProperties prop = getProperties().getDocumentProperties();
    final DfSchemaHtmlBuilder schemaHtmlBuilder = new DfSchemaHtmlBuilder(prop);
    final String delimiter = ", ";
    final List<ForeignKey> referrerList = getReferrerList();
    final int size = referrerList.size();
    if (size == 0) {
        return "&nbsp;";
    }
    for (int i = 0; i < size; i++) {
        final ForeignKey fk = referrerList.get(i);
        final Table referrerTable = fk.getTable();
        sb.append(schemaHtmlBuilder.buildRelatedTableLink(fk, referrerTable, delimiter));
    }
    sb.delete(0, delimiter.length());
    return sb.toString();
}
Also used : DfColumnListToStringBuilder(org.dbflute.logic.generate.column.DfColumnListToStringBuilder) DfDocumentProperties(org.dbflute.properties.DfDocumentProperties) DfSchemaHtmlBuilder(org.dbflute.logic.doc.schemahtml.DfSchemaHtmlBuilder)

Example 2 with DfSchemaHtmlBuilder

use of org.dbflute.logic.doc.schemahtml.DfSchemaHtmlBuilder in project dbflute-core by dbflute.

the class Column method getReferrerTableCommaStringWithHtmlHref.

public String getReferrerTableCommaStringWithHtmlHref() {
    // mainly for SchemaHTML
    if (_referrerList == null) {
        _referrerList = new ArrayList<ForeignKey>(5);
    }
    final DfDocumentProperties prop = getProperties().getDocumentProperties();
    final DfSchemaHtmlBuilder schemaHtmlBuilder = new DfSchemaHtmlBuilder(prop);
    final String delimiter = ",<br>";
    final StringBuffer sb = new StringBuffer();
    for (ForeignKey fk : _referrerList) {
        final Table referrerTable = fk.getTable();
        sb.append(schemaHtmlBuilder.buildRelatedTableLink(fk, referrerTable, delimiter));
    }
    sb.delete(0, delimiter.length());
    return sb.toString();
}
Also used : DfDocumentProperties(org.dbflute.properties.DfDocumentProperties) DfSchemaHtmlBuilder(org.dbflute.logic.doc.schemahtml.DfSchemaHtmlBuilder)

Example 3 with DfSchemaHtmlBuilder

use of org.dbflute.logic.doc.schemahtml.DfSchemaHtmlBuilder in project dbflute-core by dbflute.

the class Table method getForeignTableNameCommaStringWithHtmlHref.

public String getForeignTableNameCommaStringWithHtmlHref() {
    // for SchemaHTML
    final StringBuilder sb = new StringBuilder();
    final DfDocumentProperties prop = getProperties().getDocumentProperties();
    final DfSchemaHtmlBuilder schemaHtmlBuilder = new DfSchemaHtmlBuilder(prop);
    final String delimiter = ", ";
    final List<ForeignKey> foreignKeyList = getForeignKeyList();
    final int size = foreignKeyList.size();
    if (size == 0) {
        return "&nbsp;";
    }
    for (int i = 0; i < size; i++) {
        final ForeignKey fk = foreignKeyList.get(i);
        final Table foreignTable = fk.getForeignTable();
        sb.append(schemaHtmlBuilder.buildRelatedTableLink(fk, foreignTable, delimiter));
    }
    sb.delete(0, delimiter.length());
    return sb.toString();
}
Also used : DfColumnListToStringBuilder(org.dbflute.logic.generate.column.DfColumnListToStringBuilder) DfDocumentProperties(org.dbflute.properties.DfDocumentProperties) DfSchemaHtmlBuilder(org.dbflute.logic.doc.schemahtml.DfSchemaHtmlBuilder)

Example 4 with DfSchemaHtmlBuilder

use of org.dbflute.logic.doc.schemahtml.DfSchemaHtmlBuilder in project dbflute-core by dbflute.

the class Column method getForeignTableNameCommaStringWithHtmlHref.

public String getForeignTableNameCommaStringWithHtmlHref() {
    // mainly for SchemaHTML
    final StringBuilder sb = new StringBuilder();
    final DfDocumentProperties prop = getProperties().getDocumentProperties();
    final DfSchemaHtmlBuilder schemaHtmlBuilder = new DfSchemaHtmlBuilder(prop);
    final String delimiter = ",<br>";
    final List<ForeignKey> foreignKeyList = getForeignKeyList();
    final int size = foreignKeyList.size();
    if (size == 0) {
        return "&nbsp;";
    }
    for (int i = 0; i < size; i++) {
        final ForeignKey fk = foreignKeyList.get(i);
        final Table foreignTable = fk.getForeignTable();
        sb.append(schemaHtmlBuilder.buildRelatedTableLink(fk, foreignTable, delimiter));
    }
    sb.delete(0, delimiter.length());
    return sb.toString();
}
Also used : DfDocumentProperties(org.dbflute.properties.DfDocumentProperties) DfSchemaHtmlBuilder(org.dbflute.logic.doc.schemahtml.DfSchemaHtmlBuilder)

Aggregations

DfSchemaHtmlBuilder (org.dbflute.logic.doc.schemahtml.DfSchemaHtmlBuilder)4 DfDocumentProperties (org.dbflute.properties.DfDocumentProperties)4 DfColumnListToStringBuilder (org.dbflute.logic.generate.column.DfColumnListToStringBuilder)2