Package database.dao

Class AbstractLoadDao<T extends NonPageableLoadOptions>

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 Details

    • datasourceJndiName

      public String datasourceJndiName
    • MESSAGE_SOURCE

      protected static final org.springframework.context.support.MessageSourceAccessor MESSAGE_SOURCE
  • Constructor Details

    • AbstractLoadDao

      public AbstractLoadDao()
    • AbstractLoadDao

      public AbstractLoadDao(DefaultEntityGraph graph, org.jooq.DSLContext dsl, DslProvider dslProvider)
  • Method Details

    • defaultEntityColumnAlias

      protected static String defaultEntityColumnAlias(EntityColumn entityColumn)
    • toJooqFieldWithAlias

      protected org.jooq.Field<?> toJooqFieldWithAlias(EntityColumn entityColumn)
    • getPkFields

      public Set<EntityColumn> getPkFields()
      Specified by:
      getPkFields in interface ILoadDao<T extends NonPageableLoadOptions>
    • load

      public List<TableRow> load(Set<EntityColumn> columns)
      Specified by:
      load in interface ILoadDao<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

      protected DefaultGraphBinding[][] getMatrix()
    • getColumnSelectStep

      protected org.jooq.SelectJoinStep<org.jooq.Record> getColumnSelectStep(Set<EntityColumn> columns)
    • 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

      protected org.jooq.Field<?> convertToAggregateFunction(AggregateFuncField aggregateFuncField)
    • convertToAggregateFunctionMultiColumns

      protected org.jooq.Field<?> convertToAggregateFunctionMultiColumns(AggregateFuncField aggregateFuncField)
    • convertEntityColumnsToJooqFields

      protected List<org.jooq.Field<?>> convertEntityColumnsToJooqFields(Set<EntityColumn> entityColumns)
    • getJooqTableByEntity

      protected org.jooq.Table<?> getJooqTableByEntity(String entity)
    • getOrderByStep

      protected org.jooq.SelectLimitStep<org.jooq.Record> getOrderByStep(org.jooq.SelectOrderByStep<org.jooq.Record> orderByStep, Map<EntityColumn,SortOrder> sortMap, boolean allowAddPkToSort)
    • recordToTableFieldData

      protected TableRow recordToTableFieldData(org.jooq.Record record, Set<EntityColumn> entityColumns)
    • recordListToTableFieldDataList

      protected List<TableRow> recordListToTableFieldDataList(List<org.jooq.Record> records, Set<EntityColumn> entityColumns)
    • recordToTableRowByAlias

      protected TableRow recordToTableRowByAlias(org.jooq.Record record, Set<EntityColumn> entityColumns)
    • recordListToTableRowListByAlias

      protected List<TableRow> recordListToTableRowListByAlias(List<org.jooq.Record> records, Set<EntityColumn> entityColumns)
    • getGraphConditions

      protected List<org.jooq.Condition> 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

      public String getDatasourceJndiName()
      Specified by:
      getDatasourceJndiName in interface ILoadDao<T extends NonPageableLoadOptions>
      Specified by:
      getDatasourceJndiName in interface WebbpmDao
    • 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)