REFERRER_CB - The type of referrer condition-bean.LOCAL_CQ - The type of local condition-query.public class HpSDRFunction<REFERRER_CB extends ConditionBean,LOCAL_CQ extends ConditionQuery> extends Object
| 修飾子とタイプ | フィールドと説明 |
|---|---|
protected ConditionBean |
_baseCB |
protected DBMetaProvider |
_dbmetaProvider |
protected LOCAL_CQ |
_localCQ |
protected HpSDRSetupper<REFERRER_CB,LOCAL_CQ> |
_querySetupper |
protected DerivedReferrerOptionFactory |
_sdrOpFactory |
| コンストラクタと説明 |
|---|
HpSDRFunction(ConditionBean baseCB,
LOCAL_CQ localCQ,
HpSDRSetupper<REFERRER_CB,LOCAL_CQ> querySetupper,
DBMetaProvider dbmetaProvider,
DerivedReferrerOptionFactory sdrOpFactory) |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
protected void |
assertAliasName(String aliasName) |
protected void |
assertDerivedReferrerOption(FunctionFilterOptionCall<DerivedReferrerOption> opLambda) |
protected void |
assertSubQuery(SubQuery<?> subQuery) |
protected void |
assertUserDefFunction(String aliasName,
String function) |
void |
avg(SubQuery<REFERRER_CB> derivedCBLambda,
String aliasName)
Set up the sub query of referrer for the scalar 'avg'.
|
void |
avg(SubQuery<REFERRER_CB> derivedCBLambda,
String aliasName,
FunctionFilterOptionCall<DerivedReferrerOption> opLambda)
An overload method for avg() with an option.
|
void |
count(SubQuery<REFERRER_CB> derivedCBLambda,
String aliasName)
Set up the sub query of referrer for the scalar 'count'.
|
void |
count(SubQuery<REFERRER_CB> derivedCBLambda,
String aliasName,
FunctionFilterOptionCall<DerivedReferrerOption> opLambda)
An overload method for count() with an option.
|
void |
countDistinct(SubQuery<REFERRER_CB> derivedCBLambda,
String aliasName)
Set up the sub query of referrer for the scalar 'count-distinct'.
|
void |
countDistinct(SubQuery<REFERRER_CB> derivedCBLambda,
String aliasName,
FunctionFilterOptionCall<DerivedReferrerOption> opLambda)
An overload method for count() with an option.
|
protected ConditionBeanExceptionThrower |
createCBExThrower() |
protected DerivedReferrerOption |
createDerivedReferrerOption(FunctionFilterOptionCall<DerivedReferrerOption> opLambda) |
protected void |
doAvg(SubQuery<REFERRER_CB> subQuery,
String aliasName,
DerivedReferrerOption option) |
protected void |
doCount(SubQuery<REFERRER_CB> subQuery,
String aliasName,
DerivedReferrerOption option) |
protected void |
doCountDistinct(SubQuery<REFERRER_CB> subQuery,
String aliasName,
DerivedReferrerOption option) |
protected void |
doMax(SubQuery<REFERRER_CB> subQuery,
String aliasName,
DerivedReferrerOption option) |
protected void |
doMin(SubQuery<REFERRER_CB> subQuery,
String aliasName,
DerivedReferrerOption option) |
protected void |
doSetupQuery(String function,
SubQuery<REFERRER_CB> subQuery,
String aliasName,
DerivedReferrerOption option) |
protected void |
doSum(SubQuery<REFERRER_CB> subQuery,
String aliasName,
DerivedReferrerOption option) |
protected void |
doUserDef(SubQuery<REFERRER_CB> subQuery,
String aliasName,
String function,
DerivedReferrerOption option) |
protected String |
filterAliasName(String aliasName) |
protected boolean |
isPurposeNullAlias() |
void |
max(SubQuery<REFERRER_CB> derivedCBLambda,
String aliasName)
Set up the sub query of referrer for the scalar 'max'.
|
void |
max(SubQuery<REFERRER_CB> derivedCBLambda,
String aliasName,
FunctionFilterOptionCall<DerivedReferrerOption> opLambda)
An overload method for max() with an option.
|
void |
min(SubQuery<REFERRER_CB> derivedCBLambda,
String aliasName)
Set up the sub query of referrer for the scalar 'min'.
|
void |
min(SubQuery<REFERRER_CB> derivedCBLambda,
String aliasName,
FunctionFilterOptionCall<DerivedReferrerOption> opLambda)
An overload method for min() with an option.
|
protected DerivedReferrerOption |
newDerivedReferrerOption() |
void |
sum(SubQuery<REFERRER_CB> derivedCBLambda,
String aliasName)
Set up the sub query of referrer for the scalar 'sum'.
|
void |
sum(SubQuery<REFERRER_CB> derivedCBLambda,
String aliasName,
FunctionFilterOptionCall<DerivedReferrerOption> opLambda)
An overload method for sum() with an option.
|
protected void |
throwSpecifyDerivedReferrerInvalidAliasNameException() |
protected void |
userDef(SubQuery<REFERRER_CB> derivedCBLambda,
String aliasName,
String function,
FunctionFilterOptionCall<DerivedReferrerOption> opLambda)
Basically for database dependency (DBMS sub-class).
|
protected final ConditionBean _baseCB
protected final LOCAL_CQ extends ConditionQuery _localCQ
protected final HpSDRSetupper<REFERRER_CB extends ConditionBean,LOCAL_CQ extends ConditionQuery> _querySetupper
protected final DBMetaProvider _dbmetaProvider
protected final DerivedReferrerOptionFactory _sdrOpFactory
public HpSDRFunction(ConditionBean baseCB, LOCAL_CQ localCQ, HpSDRSetupper<REFERRER_CB,LOCAL_CQ> querySetupper, DBMetaProvider dbmetaProvider, DerivedReferrerOptionFactory sdrOpFactory)
public void count(SubQuery<REFERRER_CB> derivedCBLambda, String aliasName)
cb.specify().derivePurchaseList().count(purchaseCB -> { purchaseCB.specify().columnPurchaseId(); // basically PK to count records purchaseCB.query().setPaymentCompleteFlg_Equal_True(); // referrer condition }, Member.ALIAS_purchaseCount);
derivedCBLambda - The callback for sub-query of referrer. (NotNull)aliasName - The alias of the name. The property should exists on the entity. (NotNull)public void count(SubQuery<REFERRER_CB> derivedCBLambda, String aliasName, FunctionFilterOptionCall<DerivedReferrerOption> opLambda)
cb.specify().derivePurchaseList().count(purchaseCB -> { purchaseCB.specify().columnPurchaseId(); // basically PK to count records purchaseCB.query().setPaymentCompleteFlg_Equal_True(); // referrer condition }, Member.ALIAS_purchaseCount, op -> op.coalesce(0));
derivedCBLambda - The callback for sub-query of referrer. (NotNull)aliasName - The alias of the name. The property should exists on the entity. (NotNull)opLambda - The callback for option of DerivedReferrer. e.g. you can use a coalesce function. (NotNull)protected void doCount(SubQuery<REFERRER_CB> subQuery, String aliasName, DerivedReferrerOption option)
public void countDistinct(SubQuery<REFERRER_CB> derivedCBLambda, String aliasName)
cb.specify().derivePurchaseList().countDistinct(purchaseCB -> { purchaseCB.specify().columnProductId(); // derived column by function purchaseCB.query().setPaymentCompleteFlg_Equal_True(); // referrer condition }, Member.ALIAS_productKindCount);
derivedCBLambda - The callback for sub-query of referrer. (NotNull)aliasName - The alias of the name. The property should exists on the entity. (NotNull)public void countDistinct(SubQuery<REFERRER_CB> derivedCBLambda, String aliasName, FunctionFilterOptionCall<DerivedReferrerOption> opLambda)
cb.specify().derivePurchaseList().countDistinct(purchaseCB -> { purchaseCB.specify().columnProductId(); // derived column by function purchaseCB.query().setPaymentCompleteFlg_Equal_True(); // referrer condition }, Member.ALIAS_productKindCount, op -> op.coalesce(0));
derivedCBLambda - The callback for sub-query of referrer. (NotNull)aliasName - The alias of the name. The property should exists on the entity. (NotNull)opLambda - The callback for option of DerivedReferrer. e.g. you can use a coalesce function. (NotNull)protected void doCountDistinct(SubQuery<REFERRER_CB> subQuery, String aliasName, DerivedReferrerOption option)
public void max(SubQuery<REFERRER_CB> derivedCBLambda, String aliasName)
cb.specify().derivePurchaseList().max(purchaseCB -> { purchaseCB.specify().columnPurchaseDatetime(); // derived column by function purchaseCB.query().setPaymentCompleteFlg_Equal_True(); // referrer condition }, Member.ALIAS_latestPurchaseDatetime);
derivedCBLambda - The callback for sub-query of referrer. (NotNull)aliasName - The alias of the name. The property should exists on the entity. (NotNull)public void max(SubQuery<REFERRER_CB> derivedCBLambda, String aliasName, FunctionFilterOptionCall<DerivedReferrerOption> opLambda)
cb.specify().derivePurchaseList().max(purchaseCB -> { purchaseCB.specify().columnPurchaseDatetime(); // derived column by function purchaseCB.query().setPaymentCompleteFlg_Equal_True(); // referrer condition }, Member.ALIAS_latestPurchaseDatetime, op -> op.coalesce("2011-06-07"));
derivedCBLambda - The callback for sub-query of referrer. (NotNull)aliasName - The alias of the name. The property should exists on the entity. (NotNull)opLambda - The callback for option of DerivedReferrer. e.g. you can use a coalesce function. (NotNull)protected void doMax(SubQuery<REFERRER_CB> subQuery, String aliasName, DerivedReferrerOption option)
public void min(SubQuery<REFERRER_CB> derivedCBLambda, String aliasName)
cb.specify().derivePurchaseList().min(purchaseCB -> { purchaseCB.specify().columnPurchaseDatetime(); // derived column by function purchaseCB.query().setPaymentCompleteFlg_Equal_True(); // referrer condition }, Member.ALIAS_firstPurchaseDatetime);
derivedCBLambda - The callback for sub-query of referrer. (NotNull)aliasName - The alias of the name. The property should exists on the entity. (NotNull)public void min(SubQuery<REFERRER_CB> derivedCBLambda, String aliasName, FunctionFilterOptionCall<DerivedReferrerOption> opLambda)
cb.specify().derivePurchaseList().min(purchaseCB -> { purchaseCB.specify().columnPurchaseDatetime(); // derived column by function purchaseCB.query().setPaymentCompleteFlg_Equal_True(); // referrer condition }, Member.ALIAS_firstPurchaseDatetime, op -> op.coalesce("2011-06-07"));
derivedCBLambda - The callback for sub-query of referrer. (NotNull)aliasName - The alias of the name. The property should exists on the entity. (NotNull)opLambda - The callback for option of DerivedReferrer. e.g. you can use a coalesce function. (NotNull)protected void doMin(SubQuery<REFERRER_CB> subQuery, String aliasName, DerivedReferrerOption option)
public void sum(SubQuery<REFERRER_CB> derivedCBLambda, String aliasName)
cb.specify().derivePurchaseList().sum(purchaseCB -> { purchaseCB.specify().columnPurchasePrice(); // derived column by function purchaseCB.query().setPaymentCompleteFlg_Equal_True(); // referrer condition }, Member.ALIAS_purchasePriceSummary);
derivedCBLambda - The callback for sub-query of referrer. (NotNull)aliasName - The alias of the name. The property should exists on the entity. (NotNull)public void sum(SubQuery<REFERRER_CB> derivedCBLambda, String aliasName, FunctionFilterOptionCall<DerivedReferrerOption> opLambda)
cb.specify().derivePurchaseList().sum(purchaseCB -> { purchaseCB.specify().columnPurchasePrice(); // derived column by function purchaseCB.query().setPaymentCompleteFlg_Equal_True(); // referrer condition }, Member.ALIAS_purchasePriceSummary, op -> op.coalesce(0));
derivedCBLambda - The callback for sub-query of referrer. (NotNull)aliasName - The alias of the name. The property should exists on the entity. (NotNull)opLambda - The callback for option of DerivedReferrer. e.g. you can use a coalesce function. (NotNull)protected void doSum(SubQuery<REFERRER_CB> subQuery, String aliasName, DerivedReferrerOption option)
public void avg(SubQuery<REFERRER_CB> derivedCBLambda, String aliasName)
cb.specify().derivePurchaseList().avg(purchaseCB -> { purchaseCB.specify().columnPurchasePrice(); // derived column by function purchaseCB.query().setPaymentCompleteFlg_Equal_True(); // referrer condition }, Member.ALIAS_purchasePriceAverage);
derivedCBLambda - The callback for sub-query of referrer. (NotNull)aliasName - The alias of the name. The property should exists on the entity. (NotNull)public void avg(SubQuery<REFERRER_CB> derivedCBLambda, String aliasName, FunctionFilterOptionCall<DerivedReferrerOption> opLambda)
cb.specify().derivePurchaseList().avg(purchaseCB -> { purchaseCB.specify().columnPurchasePrice(); // derived column by function purchaseCB.query().setPaymentCompleteFlg_Equal_True(); // referrer condition }, Member.ALIAS_purchasePriceAverage, op -> op.coalesce(0));
derivedCBLambda - The callback for sub-query of referrer. (NotNull)aliasName - The alias of the name. The property should exists on the entity. (NotNull)opLambda - The callback for option of DerivedReferrer. e.g. you can use a coalesce function. (NotNull)protected void doAvg(SubQuery<REFERRER_CB> subQuery, String aliasName, DerivedReferrerOption option)
protected void doSetupQuery(String function, SubQuery<REFERRER_CB> subQuery, String aliasName, DerivedReferrerOption option)
protected void userDef(SubQuery<REFERRER_CB> derivedCBLambda, String aliasName, String function, FunctionFilterOptionCall<DerivedReferrerOption> opLambda)
derivedCBLambda - The callback for sub-query of referrer. (NotNull)aliasName - The alias of the name. The property should exists on the entity. (NotNull)function - The function expression e.g. sum, max (NotNull)opLambda - The callback for option of DerivedReferrer. e.g. you can use a coalesce function. (NotNull)protected void doUserDef(SubQuery<REFERRER_CB> subQuery, String aliasName, String function, DerivedReferrerOption option)
protected DerivedReferrerOption createDerivedReferrerOption(FunctionFilterOptionCall<DerivedReferrerOption> opLambda)
protected DerivedReferrerOption newDerivedReferrerOption()
protected void assertSubQuery(SubQuery<?> subQuery)
protected void assertAliasName(String aliasName)
protected boolean isPurposeNullAlias()
protected void throwSpecifyDerivedReferrerInvalidAliasNameException()
protected void assertDerivedReferrerOption(FunctionFilterOptionCall<DerivedReferrerOption> opLambda)
protected ConditionBeanExceptionThrower createCBExThrower()
Copyright © 2014–2015 The DBFlute Project. All rights reserved.