Search in sources :

Example 1 with BoundDateDisplayStyle

use of org.dbflute.twowaysql.style.BoundDateDisplayStyle in project dbflute-core by dbflute.

the class TnAbstractBasicSqlHandler method createDisplaySqlBuilder.

protected DisplaySqlBuilder createDisplaySqlBuilder() {
    final BoundDateDisplayStyle realStyle;
    final BoundDateDisplayStyle specifiedStyle = getSpecifiedLogDateDisplayStyle();
    if (specifiedStyle != null) {
        realStyle = specifiedStyle;
    } else {
        realStyle = createResourcedLogDateDisplayStyle();
    }
    return newDisplaySqlBuilder(realStyle);
}
Also used : BoundDateDisplayStyle(org.dbflute.twowaysql.style.BoundDateDisplayStyle)

Example 2 with BoundDateDisplayStyle

use of org.dbflute.twowaysql.style.BoundDateDisplayStyle in project dbflute-core by dbflute.

the class AbstractConditionBean method createConfiguredBoundDateDisplayStyle.

protected BoundDateDisplayStyle createConfiguredBoundDateDisplayStyle() {
    final String datePattern = getConfiguredLogDatePattern();
    final String timestampPattern = getConfiguredLogTimestampPattern();
    final String timePattern = getConfiguredLogTimePattern();
    final BoundDateDisplayTimeZoneProvider timeZoneProvider = getConfiguredLogTimeZoneProvider();
    return new BoundDateDisplayStyle(datePattern, timestampPattern, timePattern, timeZoneProvider);
}
Also used : BoundDateDisplayTimeZoneProvider(org.dbflute.twowaysql.style.BoundDateDisplayTimeZoneProvider) BoundDateDisplayStyle(org.dbflute.twowaysql.style.BoundDateDisplayStyle)

Example 3 with BoundDateDisplayStyle

use of org.dbflute.twowaysql.style.BoundDateDisplayStyle in project dbflute-core by dbflute.

the class AbstractConditionBean method toDisplaySql.

// ===================================================================================
// DisplaySQL
// ==========
/**
 * {@inheritDoc}
 */
public String toDisplaySql() {
    final SqlAnalyzerFactory factory = getSqlAnalyzerFactory();
    final BoundDateDisplayStyle realStyle;
    final BoundDateDisplayStyle specifiedStyle = getLogDateDisplayStyle();
    if (specifiedStyle != null) {
        realStyle = specifiedStyle;
    } else {
        realStyle = createConfiguredBoundDateDisplayStyle();
    }
    return convertConditionBean2DisplaySql(factory, this, realStyle);
}
Also used : SqlAnalyzerFactory(org.dbflute.twowaysql.factory.SqlAnalyzerFactory) BoundDateDisplayStyle(org.dbflute.twowaysql.style.BoundDateDisplayStyle)

Example 4 with BoundDateDisplayStyle

use of org.dbflute.twowaysql.style.BoundDateDisplayStyle in project dbflute-core by dbflute.

the class TnAbstractBasicSqlHandler method createResourcedLogDateDisplayStyle.

protected BoundDateDisplayStyle createResourcedLogDateDisplayStyle() {
    final String datePattern = ResourceContext.getLogDatePattern();
    final String iimestampPattern = ResourceContext.getLogTimestampPattern();
    final String timePattern = ResourceContext.getLogTimePattern();
    final BoundDateDisplayTimeZoneProvider timeZoneProvider = ResourceContext.getLogTimeZoneProvider();
    return new BoundDateDisplayStyle(datePattern, iimestampPattern, timePattern, timeZoneProvider);
}
Also used : BoundDateDisplayTimeZoneProvider(org.dbflute.twowaysql.style.BoundDateDisplayTimeZoneProvider) BoundDateDisplayStyle(org.dbflute.twowaysql.style.BoundDateDisplayStyle)

Example 5 with BoundDateDisplayStyle

use of org.dbflute.twowaysql.style.BoundDateDisplayStyle in project dbflute-core by dbflute.

the class TnAbstractBasicSqlHandler method getSpecifiedLogDateDisplayStyle.

protected BoundDateDisplayStyle getSpecifiedLogDateDisplayStyle() {
    if (ConditionBeanContext.isExistConditionBeanOnThread()) {
        final ConditionBean cb = ConditionBeanContext.getConditionBeanOnThread();
        final BoundDateDisplayStyle specifiedStyle = cb.getLogDateDisplayStyle();
        if (specifiedStyle != null) {
            return specifiedStyle;
        }
    }
    return null;
}
Also used : BoundDateDisplayStyle(org.dbflute.twowaysql.style.BoundDateDisplayStyle) ConditionBean(org.dbflute.cbean.ConditionBean)

Aggregations

BoundDateDisplayStyle (org.dbflute.twowaysql.style.BoundDateDisplayStyle)5 BoundDateDisplayTimeZoneProvider (org.dbflute.twowaysql.style.BoundDateDisplayTimeZoneProvider)2 ConditionBean (org.dbflute.cbean.ConditionBean)1 SqlAnalyzerFactory (org.dbflute.twowaysql.factory.SqlAnalyzerFactory)1