Package database.dao
Class AbstractLoadDao<T extends NonPageableLoadOptions>
java.lang.Object
ru.cg.webbpm.modules.database.api.entity_graph.dao.DefaultGraphDao
database.dao.AbstractLoadDao<T>
- All Implemented Interfaces:
ILoadDao<T>
,WebbpmDao
,TableProvider
- Direct Known Subclasses:
DefaultLoadDao
,TreeDefaultLoadDao
public abstract class AbstractLoadDao<T extends NonPageableLoadOptions>
extends DefaultGraphDao
implements ILoadDao<T>
- Author:
- l.tyshchenko
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final org.springframework.context.support.MessageSourceAccessor
Fields inherited from class ru.cg.webbpm.modules.database.api.entity_graph.dao.DefaultGraphDao
conditionBuilder, databaseStructureManager, dslProvider, graph
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractLoadDao
(DefaultEntityGraph graph, org.jooq.DSLContext dsl, DslProvider dslProvider) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addJoins
(org.jooq.SelectJoinStep<org.jooq.Record> selectJoinStep, int currentIndex, int parentIndex, DefaultGraphBinding[][] matrix) protected org.jooq.SelectHavingStep<org.jooq.Record>
buildGroupByStep
(org.jooq.SelectConnectByStep<org.jooq.Record> joinStep, Set<EntityColumn> columns) protected org.jooq.SelectConnectByStep<org.jooq.Record>
buildLoadByPkQuery
(Set<EntityColumn> columns, T loadOptions, Object[] keyValues) protected org.jooq.SelectConnectByStep<org.jooq.Record>
buildLoadByPkQuery
(Set<EntityColumn> columns, T loadOptions, Object[] keyValues, boolean withGraphConditions) protected org.jooq.SelectConnectByStep<org.jooq.Record>
buildSelectCountWhere
(org.jooq.Condition... whereConditions) protected org.jooq.SelectConnectByStep<org.jooq.Record>
buildSelectCountWhere
(EntityColumn entityColumn, org.jooq.Condition... whereConditions) protected org.jooq.SelectJoinStep<org.jooq.Record>
buildSelectStepWithAggregationColumns
(Set<EntityColumn> columns, Set<AggregateFuncField> aggregateFuncFields) protected org.jooq.SelectConnectByStep<org.jooq.Record>
buildWhereStep
(org.jooq.SelectJoinStep<org.jooq.Record> selectStep) protected org.jooq.SelectConnectByStep<org.jooq.Record>
buildWhereStep
(org.jooq.SelectJoinStep<org.jooq.Record> selectStep, Collection<org.jooq.Condition> whereConditions) protected org.jooq.SelectConnectByStep<org.jooq.Record>
buildWhereStep
(org.jooq.SelectJoinStep<org.jooq.Record> selectStep, Collection<org.jooq.Condition> whereConditions, boolean withGraphConditions) protected List<org.jooq.Field<?>>
convertAggregateFuncFieldToJooqFields
(Set<AggregateFuncField> aggregateFuncFields) protected List<org.jooq.Field<?>>
convertAggregateFuncMultiFieldToJooqFields
(Set<AggregateFuncField> aggregateFuncFields) protected List<org.jooq.Field<?>>
convertEntityColumnsToJooqFields
(Set<EntityColumn> entityColumns) protected org.jooq.Field<?>
convertToAggregateFunction
(AggregateFuncField aggregateFuncField) protected org.jooq.Field<?>
convertToAggregateFunctionMultiColumns
(AggregateFuncField aggregateFuncField) protected static String
defaultEntityColumnAlias
(EntityColumn entityColumn) protected org.jooq.SelectJoinStep<org.jooq.Record>
protected org.jooq.SelectJoinStep<org.jooq.Record>
protected org.jooq.SelectJoinStep<org.jooq.Record>
getColumnSelectStep
(Set<EntityColumn> columns) protected org.jooq.SelectJoinStep<org.jooq.Record>
getColumnWithAliasSelectStep
(Set<EntityColumn> entityColumns) protected List<org.jooq.Condition>
protected org.jooq.Table<?>
getJooqTableByEntity
(String entity) protected DefaultGraphBinding[][]
protected org.jooq.SelectLimitStep<org.jooq.Record>
getOrderByStep
(org.jooq.SelectOrderByStep<org.jooq.Record> orderByStep, Map<EntityColumn, SortOrder> sortMap, boolean allowAddPkToSort) protected org.jooq.SelectJoinStep<org.jooq.Record>
protected org.jooq.SelectJoinStep<org.jooq.Record>
getSelectCountJoinStep
(EntityColumn entityColumn) load
(Set<EntityColumn> columns) load
(Set<EntityColumn> columns, T loadOptions, boolean withGraphConditions) prepareResultListWithAggregateColumns
(Set<EntityColumn> columns, Set<AggregateFuncField> aggregateFuncFields, org.jooq.Result<org.jooq.Record> records) recordListToTableFieldDataList
(List<org.jooq.Record> records, Set<EntityColumn> entityColumns) recordListToTableRowListByAlias
(List<org.jooq.Record> records, Set<EntityColumn> entityColumns) protected TableRow
recordToTableFieldData
(org.jooq.Record record, Set<EntityColumn> entityColumns) protected TableRow
recordToTableRowByAlias
(org.jooq.Record record, Set<EntityColumn> entityColumns) protected org.jooq.SelectJoinStep<org.jooq.Record>
selectByJooqColumns
(List<org.jooq.Field<?>> fieldList) protected org.jooq.Field<?>
toJooqFieldWithAlias
(EntityColumn entityColumn) Methods inherited from class ru.cg.webbpm.modules.database.api.entity_graph.dao.DefaultGraphDao
getComplexCondition, getContainsCondition, getDsl, getDsl, getEndsWithCondition, getEqualCondition, getEqualIgnoreCaseCondition, getFilterCondition, getFilterCondition, getFilterCondition, getFilterCondition, getFilterConditions, getGraphNodeTablePkFields, getGreaterOrEqualCondition, getGreaterThanCondition, getLessOrEqualCondition, getLessThanCondition, getNotContainsCondition, getNotEqualCondition, getOperator, getSequence, getStartsWithCondition, getStructureTable, getTable, getTableWithAlias, getUsedTables, setDatabaseStructureManager, setDsl, setDslProvider, setGraph, toJooqField
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ru.cg.webbpm.modules.database.api.dao.ILoadDao
getTotalRowCount, getTotalRowCount, load, loadAggregations, loadAggregations, loadByPK, loadByPK, loadMultiFieldAggregations
Methods inherited from interface ru.cg.webbpm.modules.database.api.TableProvider
getTableByAlias, getUsedTables
-
Field Details
-
datasourceJndiName
-
MESSAGE_SOURCE
protected static final org.springframework.context.support.MessageSourceAccessor MESSAGE_SOURCE
-
-
Constructor Details
-
AbstractLoadDao
public AbstractLoadDao() -
AbstractLoadDao
-
-
Method Details
-
defaultEntityColumnAlias
-
toJooqFieldWithAlias
-
getPkFields
- Specified by:
getPkFields
in interfaceILoadDao<T extends NonPageableLoadOptions>
-
load
- Specified by:
load
in interfaceILoadDao<T extends NonPageableLoadOptions>
-
load
public abstract List<TableRow> load(Set<EntityColumn> columns, T loadOptions, boolean withGraphConditions) -
prepareResultListWithAggregateColumns
protected List<TableRow> prepareResultListWithAggregateColumns(Set<EntityColumn> columns, Set<AggregateFuncField> aggregateFuncFields, org.jooq.Result<org.jooq.Record> records) -
buildGroupByStep
protected org.jooq.SelectHavingStep<org.jooq.Record> buildGroupByStep(org.jooq.SelectConnectByStep<org.jooq.Record> joinStep, Set<EntityColumn> columns) -
addJoins
protected void addJoins(org.jooq.SelectJoinStep<org.jooq.Record> selectJoinStep, int currentIndex, int parentIndex, DefaultGraphBinding[][] matrix) -
getMatrix
-
getColumnSelectStep
-
getColumnWithAliasSelectStep
protected org.jooq.SelectJoinStep<org.jooq.Record> getColumnWithAliasSelectStep(Set<EntityColumn> entityColumns) -
getAggregateFuncFieldSelectStep
protected org.jooq.SelectJoinStep<org.jooq.Record> getAggregateFuncFieldSelectStep(Set<AggregateFuncField> columns) -
getAggregateFuncMultiFieldSelectStep
protected org.jooq.SelectJoinStep<org.jooq.Record> getAggregateFuncMultiFieldSelectStep(Set<AggregateFuncField> columns) -
buildSelectStepWithAggregationColumns
protected org.jooq.SelectJoinStep<org.jooq.Record> buildSelectStepWithAggregationColumns(Set<EntityColumn> columns, Set<AggregateFuncField> aggregateFuncFields) -
selectByJooqColumns
protected org.jooq.SelectJoinStep<org.jooq.Record> selectByJooqColumns(List<org.jooq.Field<?>> fieldList) -
convertAggregateFuncFieldToJooqFields
protected List<org.jooq.Field<?>> convertAggregateFuncFieldToJooqFields(Set<AggregateFuncField> aggregateFuncFields) -
convertAggregateFuncMultiFieldToJooqFields
protected List<org.jooq.Field<?>> convertAggregateFuncMultiFieldToJooqFields(Set<AggregateFuncField> aggregateFuncFields) -
convertToAggregateFunction
-
convertToAggregateFunctionMultiColumns
protected org.jooq.Field<?> convertToAggregateFunctionMultiColumns(AggregateFuncField aggregateFuncField) -
convertEntityColumnsToJooqFields
-
getJooqTableByEntity
-
getOrderByStep
protected org.jooq.SelectLimitStep<org.jooq.Record> getOrderByStep(org.jooq.SelectOrderByStep<org.jooq.Record> orderByStep, Map<EntityColumn, SortOrder> sortMap, boolean allowAddPkToSort) -
recordToTableFieldData
-
recordListToTableFieldDataList
protected List<TableRow> recordListToTableFieldDataList(List<org.jooq.Record> records, Set<EntityColumn> entityColumns) -
recordToTableRowByAlias
-
recordListToTableRowListByAlias
protected List<TableRow> recordListToTableRowListByAlias(List<org.jooq.Record> records, Set<EntityColumn> entityColumns) -
getGraphConditions
-
buildWhereStep
protected org.jooq.SelectConnectByStep<org.jooq.Record> buildWhereStep(org.jooq.SelectJoinStep<org.jooq.Record> selectStep) -
buildWhereStep
protected org.jooq.SelectConnectByStep<org.jooq.Record> buildWhereStep(org.jooq.SelectJoinStep<org.jooq.Record> selectStep, Collection<org.jooq.Condition> whereConditions) -
buildWhereStep
protected org.jooq.SelectConnectByStep<org.jooq.Record> buildWhereStep(org.jooq.SelectJoinStep<org.jooq.Record> selectStep, Collection<org.jooq.Condition> whereConditions, boolean withGraphConditions) -
getDatasourceJndiName
- Specified by:
getDatasourceJndiName
in interfaceILoadDao<T extends NonPageableLoadOptions>
- Specified by:
getDatasourceJndiName
in interfaceWebbpmDao
-
getSelectCountJoinStep
protected org.jooq.SelectJoinStep<org.jooq.Record> getSelectCountJoinStep() -
getSelectCountJoinStep
protected org.jooq.SelectJoinStep<org.jooq.Record> getSelectCountJoinStep(EntityColumn entityColumn) -
buildSelectCountWhere
protected org.jooq.SelectConnectByStep<org.jooq.Record> buildSelectCountWhere(org.jooq.Condition... whereConditions) -
buildSelectCountWhere
protected org.jooq.SelectConnectByStep<org.jooq.Record> buildSelectCountWhere(EntityColumn entityColumn, org.jooq.Condition... whereConditions) -
buildLoadByPkQuery
protected org.jooq.SelectConnectByStep<org.jooq.Record> buildLoadByPkQuery(Set<EntityColumn> columns, T loadOptions, Object[] keyValues) -
buildLoadByPkQuery
protected org.jooq.SelectConnectByStep<org.jooq.Record> buildLoadByPkQuery(Set<EntityColumn> columns, T loadOptions, Object[] keyValues, boolean withGraphConditions)
-