Class AbstractSqlLikeQueryBuilder2.SqlSelectionVisitor

java.lang.Object
io.micronaut.data.model.query.builder.sql.AbstractSqlLikeQueryBuilder2.SqlSelectionVisitor
All Implemented Interfaces:
ExpressionVisitor, SelectionVisitor
Direct Known Subclasses:
SqlQueryBuilder2.SqlSelectionVisitor
Enclosing class:
AbstractSqlLikeQueryBuilder2

protected class AbstractSqlLikeQueryBuilder2.SqlSelectionVisitor extends Object implements SelectionVisitor
The selection visitor to construct the query.
  • Field Details

    • queryState

      protected final AbstractSqlLikeQueryBuilder2.QueryState queryState
    • query

      protected final StringBuilder query
    • annotationMetadata

      protected final io.micronaut.core.annotation.AnnotationMetadata annotationMetadata
    • distinct

      protected final boolean distinct
    • tableAlias

      protected final String tableAlias
    • entity

      protected final PersistentEntity entity
    • columnAlias

      protected String columnAlias
  • Constructor Details

  • Method Details

    • visit

      public void visit(PersistentPropertyPath<?> persistentPropertyPath)
      Description copied from interface: ExpressionVisitor
      Specified by:
      visit in interface ExpressionVisitor
      Parameters:
      persistentPropertyPath - The persistentPropertyPath
    • visit

      public void visit(AliasedSelection<?> aliasedSelection)
      Description copied from interface: SelectionVisitor
      Specified by:
      visit in interface SelectionVisitor
      Parameters:
      aliasedSelection - The aliasedSelection
    • visit

      public void visit(PersistentEntityRoot<?> entityRoot)
      Description copied from interface: ExpressionVisitor
      Specified by:
      visit in interface ExpressionVisitor
      Parameters:
      entityRoot - The entityRoot
    • visit

      public void visit(CompoundSelection<?> compoundSelection)
      Description copied from interface: SelectionVisitor
      Specified by:
      visit in interface SelectionVisitor
      Parameters:
      compoundSelection - The compoundSelection
    • visit

      public void visit(LiteralExpression<?> literalExpression)
      Description copied from interface: ExpressionVisitor
      Specified by:
      visit in interface ExpressionVisitor
      Parameters:
      literalExpression - The literalExpression
    • visit

      public void visit(UnaryExpression<?> unaryExpression)
      Description copied from interface: ExpressionVisitor
      Specified by:
      visit in interface ExpressionVisitor
      Parameters:
      unaryExpression - The unary expression
    • visit

      public void visit(BinaryExpression<?> binaryExpression)
      Description copied from interface: ExpressionVisitor
      Specified by:
      visit in interface ExpressionVisitor
      Parameters:
      binaryExpression - The aggregateExpression
    • visit

      public void visit(IdExpression<?,?> idExpression)
      Description copied from interface: ExpressionVisitor
      Specified by:
      visit in interface ExpressionVisitor
      Parameters:
      idExpression - The idExpression
    • visit

      public void visit(FunctionExpression<?> functionExpression)
      Description copied from interface: ExpressionVisitor
      Specified by:
      visit in interface ExpressionVisitor
      Parameters:
      functionExpression - The function expression
    • appendCompoundPropertyProjection

      @Internal protected void appendCompoundPropertyProjection(PersistentPropertyPath propertyPath)
      Appends the compound (part of entity or DTO) property projection.
      Parameters:
      propertyPath - The property path
    • appendCompoundAssociationProjection

      @Internal protected void appendCompoundAssociationProjection(PersistentAssociationPath propertyPath)
      Appends the compound (part of entity or DTO) association projection.
      Parameters:
      propertyPath - The property path
    • appendPropertyProjection

      protected void appendPropertyProjection(AbstractSqlLikeQueryBuilder2.QueryPropertyPath propertyPath)
      Append the property projection.
      Parameters:
      propertyPath - The property
    • appendAssociationProjection

      protected void appendAssociationProjection(Association association, PersistentPropertyPath propertyPath)
      Appends selection projection for the property which is association.
      Parameters:
      association - the persistent property
      propertyPath - the persistent property path
    • appendRowCount

      protected void appendRowCount(String logicalName)
      Appends a row count projection to the query string.
      Parameters:
      logicalName - The alias to the table name
    • appendRowCountDistinct

      protected void appendRowCountDistinct(String logicalName)
      Appends a row count distinct projection to the query string.
      Parameters:
      logicalName - The alias to the table name
    • selectAllColumns

      protected void selectAllColumns(io.micronaut.core.annotation.AnnotationMetadata annotationMetadata, PersistentEntity persistentEntity, String tableAlias)
      Select all the columns from the entity.
      Parameters:
      annotationMetadata - The annotation metadata
      persistentEntity - The persistent entity
      tableAlias - The table alias
    • selectAllColumnsAndJoined

      protected void selectAllColumnsAndJoined()
      Select all the columns from the entity and the joined entities.
    • selectAllColumnsFromJoinPaths

      protected void selectAllColumnsFromJoinPaths(Collection<JoinPath> allPaths, @Nullable @Nullable Map<JoinPath,String> joinAliasOverride)
      Does nothing but subclasses might override and implement new behavior.
      Parameters:
      allPaths - The join paths
      joinAliasOverride - The join alias override
    • appendProperty

      protected final void appendProperty(StringBuilder sb, List<Association> associations, PersistentProperty property, NamingStrategy namingStrategy, String tableAlias, boolean escape)