use of org.dbflute.cbean.ConditionBean in project dbflute-core by dbflute.
the class QueryDerivedReferrer method buildRightClauseDreamCruiseExp.
protected void buildRightClauseDreamCruiseExp(StringBuilder sb) {
final SpecifiedColumn specifiedColumn = (SpecifiedColumn) _value;
final String columnExp = specifiedColumn.toColumnRealName().toString();
final String appended;
if (specifiedColumn.hasSpecifyCalculation()) {
specifiedColumn.xinitSpecifyCalculation();
final HpCalcSpecification<ConditionBean> calcSpecification = specifiedColumn.getSpecifyCalculation();
appended = calcSpecification.buildStatementToSpecifidName(columnExp);
} else {
appended = columnExp;
}
sb.append(appended);
}
use of org.dbflute.cbean.ConditionBean in project dbflute-core by dbflute.
the class SelectCursorCBCommand method beforeGettingSqlExecution.
// ===================================================================================
// Process Callback
// ================
public void beforeGettingSqlExecution() {
assertStatus("beforeGettingSqlExecution");
final ConditionBean cb = _conditionBean;
FetchAssistContext.setFetchBeanOnThread(cb);
ConditionBeanContext.setConditionBeanOnThread(cb);
ConditionBeanContext.setEntityRowHandlerOnThread(_entityRowHandler);
}
use of org.dbflute.cbean.ConditionBean in project dbflute-core by dbflute.
the class ContextStack method restoreAllContextOnThreadIfExists.
public static void restoreAllContextOnThreadIfExists() {
if (!isExistContextStackOnThread()) {
return;
}
final Stack<ContextStack> stackOnThread = getContextStackOnThread();
if (stackOnThread.isEmpty()) {
clearContextStackOnThread();
return;
}
final ContextStack contextStack = stackOnThread.pop();
final ConditionBean cb = contextStack.getConditionBean();
if (cb != null) {
ConditionBeanContext.setConditionBeanOnThread(cb);
}
final EntityRowHandler<? extends Entity> entityRowHandler = contextStack.getEntityRowHandler();
if (entityRowHandler != null) {
ConditionBeanContext.setEntityRowHandlerOnThread(entityRowHandler);
}
final OutsideSqlContext outsideSqlContext = contextStack.getOutsideSqlContext();
if (outsideSqlContext != null) {
OutsideSqlContext.setOutsideSqlContextOnThread(outsideSqlContext);
}
final FetchBean fetchBean = contextStack.getFetchBean();
if (fetchBean != null) {
FetchAssistContext.setFetchBeanOnThread(fetchBean);
}
final Map<String, Object> internalMap = contextStack.getInternalMap();
if (internalMap != null) {
InternalMapContext.clearInternalMapContextOnThread();
final Set<Entry<String, Object>> entrySet = internalMap.entrySet();
for (Entry<String, Object> entry : entrySet) {
InternalMapContext.setObject(entry.getKey(), entry.getValue());
}
}
final ResourceContext resourceContext = contextStack.getResourceContext();
if (resourceContext != null) {
ResourceContext.setResourceContextOnThread(resourceContext);
}
}
use of org.dbflute.cbean.ConditionBean in project dbflute-core by dbflute.
the class SelectCountCBCommand method afterExecuting.
public void afterExecuting() {
assertStatus("afterExecuting");
final ConditionBean cb = _conditionBean;
cb.xafterCareSelectCountIgnoreFetchScope();
}
use of org.dbflute.cbean.ConditionBean in project dbflute-core by dbflute.
the class SelectCBExecution method extractConditionBean.
// -----------------------------------------------------
// Argument Handling
// -----------------
protected ConditionBean extractConditionBean(Object[] args) {
assertArgsValid(args);
final Object firstElement = args[0];
assertObjectNotNull("args[0]", firstElement);
assertFirstElementConditionBean(firstElement);
final ConditionBean cb = (ConditionBean) firstElement;
return cb;
}
Aggregations