CB - The type of condition-bean for column specification.public class HpCalcSpecification<CB extends ConditionBean> extends Object implements ColumnCalculator, HpCalcStatement
| 修飾子とタイプ | フィールドと説明 |
|---|---|
protected ConditionBean |
_baseCB
The condition bean of target column to judge database type and save parameters of conversion.
|
protected List<HpCalcElement> |
_calculationList |
protected boolean |
_convert |
protected HpCalcSpecification<CB> |
_leftCalcSp |
protected boolean |
_leftMode |
protected Object |
_mysticBindingSnapshot |
protected CB |
_specifedCB
The specified condition bean to handle the specified column.
|
protected SpecifyQuery<CB> |
_specifyQuery
The specify query call-back to specify column.
|
protected boolean |
_synchronizeSetupSelectByJourneyLogBook |
| コンストラクタと説明 |
|---|
HpCalcSpecification(SpecifyQuery<CB> specifyQuery) |
HpCalcSpecification(SpecifyQuery<CB> specifyQuery,
ConditionBean baseCB) |
protected final SpecifyQuery<CB extends ConditionBean> _specifyQuery
protected ConditionBean _baseCB
protected CB extends ConditionBean _specifedCB
protected final List<HpCalcElement> _calculationList
protected boolean _leftMode
protected HpCalcSpecification<CB extends ConditionBean> _leftCalcSp
protected boolean _convert
protected boolean _synchronizeSetupSelectByJourneyLogBook
protected Object _mysticBindingSnapshot
public HpCalcSpecification(SpecifyQuery<CB> specifyQuery)
public HpCalcSpecification(SpecifyQuery<CB> specifyQuery, ConditionBean baseCB)
public void specify(CB cb)
public ColumnInfo getSpecifiedColumnInfo()
public ColumnInfo getSpecifiedDerivingColumnInfo()
public SpecifiedColumn getResolvedSpecifiedColumn()
public ColumnInfo getResolvedSpecifiedColumnInfo()
public String getResolvedSpecifiedColumnDbName()
protected ColumnSqlName getResolvedSpecifiedColumnSqlName()
public ColumnRealName getResolvedSpecifiedColumnRealName()
public String getResolvedSpecifiedTableAliasName()
protected void checkSpecifiedCB()
protected void throwSpecifiedConditionBeanNotFoundException()
public ColumnCalculator plus(Number plusValue)
plus インタフェース内 ColumnCalculatorplusValue - The number value for plus. (NotNull)public ColumnCalculator plus(SpecifiedColumn plusColumn)
e.g. ManualOrder: order by PURCHASE_PRICE + PURCHASE_COUNT cb.query().addOrderBy_PurchasePrice_Asc().withManualOrder(op -> { op.plus(cb.dreamCruiseCB().specify().columnPurchaseCount()); }); e.g. ColumnQuery: ... > PURCHASE_PRICE + PURCHASE_COUNT cb.columnQuery(colCB -> { cb.column...(); }).greaterThan(colCB -> { cb.columnPurchasePrice(); }).plus(cb.dreamCruiseCB().specify().columnPurchaseCount());
plus インタフェース内 ColumnCalculatorplusColumn - The plus column specified by your Dream Cruise. (NotNull)public ColumnCalculator minus(Number minusValue)
minus インタフェース内 ColumnCalculatorminusValue - The number value for minus. (NotNull)public ColumnCalculator minus(SpecifiedColumn minusColumn)
e.g. ManualOrder: order by PURCHASE_PRICE - PURCHASE_COUNT cb.query().addOrderBy_PurchasePrice_Asc().withManualOrder(op -> { op.minus(cb.dreamCruiseCB().specify().columnPurchaseCount()); }); e.g. ColumnQuery: ... > PURCHASE_PRICE - PURCHASE_COUNT cb.columnQuery(colCB -> { cb.column...(); }).greaterThan(colCB -> { cb.columnPurchasePrice(); }).minus(cb.dreamCruiseCB().specify().columnPurchaseCount());
minus インタフェース内 ColumnCalculatorminusColumn - The minus column specified by your Dream Cruise. (NotNull)public ColumnCalculator multiply(Number multiplyValue)
multiply インタフェース内 ColumnCalculatormultiplyValue - The number value for multiply. (NotNull)public ColumnCalculator multiply(SpecifiedColumn multiplyColumn)
e.g. ManualOrder: order by PURCHASE_PRICE * PURCHASE_COUNT cb.query().addOrderBy_PurchasePrice_Asc().withManualOrder(op -> { op.multiply(cb.dreamCruiseCB().specify().columnPurchaseCount()); }); e.g. ColumnQuery: ... > PURCHASE_PRICE * PURCHASE_COUNT cb.columnQuery(colCB -> { cb.column...(); }).greaterThan(colCB -> { cb.columnPurchasePrice(); }).multiply(cb.dreamCruiseCB().specify().columnPurchaseCount());
multiply インタフェース内 ColumnCalculatormultiplyColumn - The multiply column specified by your Dream Cruise. (NotNull)public ColumnCalculator divide(Number divideValue)
divide インタフェース内 ColumnCalculatordivideValue - The number value for divide. (NotNull)public ColumnCalculator divide(SpecifiedColumn divideColumn)
e.g. ManualOrder: order by PURCHASE_PRICE / PURCHASE_COUNT cb.query().addOrderBy_PurchasePrice_Asc().withManualOrder(op -> { op.divide(cb.dreamCruiseCB().specify().columnPurchaseCount()); }); e.g. ColumnQuery: ... > PURCHASE_PRICE / PURCHASE_COUNT cb.columnQuery(colCB -> { cb.column...(); }).greaterThan(colCB -> { cb.columnPurchasePrice(); }).divide(cb.dreamCruiseCB().specify().columnPurchaseCount());
divide インタフェース内 ColumnCalculatordivideColumn - The divide column specified by your Dream Cruise. (NotNull)protected ColumnCalculator register(HpCalcElement.CalculationType type, Number value)
protected ColumnCalculator register(HpCalcElement.CalculationType type, SpecifiedColumn column)
public ColumnCalculator convert(FunctionFilterOptionCall<ColumnConversionOption> opLambda)
...).convert(op -> op.addDay(8).truncTime());
convert インタフェース内 ColumnCalculatoropLambda - The callback for conversion option of column. (NotNull)protected ColumnConversionOption createColumnConversionOption()
protected ColumnCalculator registerConv(ColumnConversionOption option)
protected void prepareConvOption(ColumnConversionOption option, boolean removeCalcAlias)
protected void assertLeftCalcSp()
protected void throwCalculationLeftColumnUnsupportedException()
public ColumnCalculator left()
left インタフェース内 ColumnCalculatorpublic ColumnCalculator right()
right インタフェース内 ColumnCalculatorpublic String buildStatementAsSqlName(String aliasName)
buildStatementAsSqlName インタフェース内 HpCalcStatementaliasName - The alias name of the target column, containing dot mark. (NullAllowed)public String buildStatementToSpecifidName(String columnExp)
buildStatementToSpecifidName インタフェース内 HpCalcStatementcolumnExp - The expression of the column. (NotNull)public String buildStatementToSpecifidNameRemovedCalcAlias(String columnExp)
public String buildStatementToSpecifidName(String columnExp, Map<String,String> columnAliasMap)
buildStatementToSpecifidName インタフェース内 HpCalcStatementcolumnExp - The expression of the column. (NotNull)columnAliasMap - The map of column alias. (NotNull)protected String doBuildStatement(String columnExp, Map<String,String> columnAliasMap, boolean removeCalcAlias)
protected boolean needsFirstEnclosing(String targetExp)
protected String buildCalculationExp(String targetExp, Map<String,String> columnAliasMap, HpCalcElement calculation, boolean removeCalcAlias)
targetExp - The expression of target column already handled cipher. (NotNull)columnAliasMap - The map of column alias. (NullAllowed)calculation - The element of calculation. (NotNull)removeCalcAlias - Does it remove alias of calculation column.protected String decryptIfNeeds(ColumnInfo columnInfo, String valueExp)
protected Object filterNestedCalculation(Object specifiedRealName, SpecifiedColumn hpCol)
protected void throwCalculationColumnRelationUnresolvedException(String targetExp, SpecifiedColumn calculationColumn)
protected void throwCalculationElementIllegalStateException(String targetExp)
public boolean isSpecifyColumn()
public boolean isDerivedReferrer()
public boolean mayNullRevived()
public void synchronizeSetupSelectByJourneyLogBook()
protected void setupSelectDreamCruiseJourneyLogBookIfUnionExists(SpecifiedColumn column)
protected void assertObjectNotNull(String variableName, Object value)
variableName - The check name of variable for message. (NotNull)value - The checked value. (NotNull)IllegalArgumentException - When the argument is null.protected void assertCalculationColumnNumber(SpecifiedColumn specifiedColumn)
protected void assertSpecifiedDreamCruiseTicket(SpecifiedColumn column)
public SpecifyQuery<CB> getSpecifyQuery()
public void setBaseCB(ConditionBean baseCB)
public boolean hasCalculation()
public List<HpCalcElement> getCalculationList()
public boolean hasConvert()
public HpCalcSpecification<CB> getLeftCalcSp()
public void setLeftCalcSp(HpCalcSpecification<CB> leftCalcSp)
public Object getMysticBindingSnapshot()
public void setMysticBindingSnapshot(Object mysticBindingSnapshot)
Copyright © 2014–2015 The DBFlute Project. All rights reserved.