use of org.dbflute.twowaysql.factory.SqlAnalyzerFactory 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);
}
use of org.dbflute.twowaysql.factory.SqlAnalyzerFactory in project dbflute-core by dbflute.
the class ResourceContext method createSqlAnalyzer.
public static SqlAnalyzer createSqlAnalyzer(String sql, boolean blockNullParameter) {
assertResourceContextExists();
final ResourceContext context = getResourceContextOnThread();
final SqlAnalyzerFactory factory = context.getSqlAnalyzerFactory();
if (factory == null) {
String msg = "The factory of SQL analyzer should exist:";
msg = msg + " sql=" + sql + " blockNullParameter=" + blockNullParameter;
throw new IllegalStateException(msg);
}
final SqlAnalyzer created = factory.create(sql, blockNullParameter);
if (created != null) {
return created;
}
String msg = "The factory should not return null:";
msg = msg + " sql=" + sql + " factory=" + factory;
throw new IllegalStateException(msg);
}
Aggregations