Class AbstractISegmentList

java.lang.Object
java.util.AbstractCollection<ISqlSegment>
java.util.AbstractList<ISqlSegment>
java.util.ArrayList<ISqlSegment>
com.baomidou.mybatisplus.core.conditions.segments.AbstractISegmentList
All Implemented Interfaces:
ISqlSegment, StringPool, Serializable, Cloneable, Iterable<ISqlSegment>, Collection<ISqlSegment>, List<ISqlSegment>, RandomAccess, SequencedCollection<ISqlSegment>
Direct Known Subclasses:
GroupBySegmentList, HavingSegmentList, NormalSegmentList, OrderBySegmentList

public abstract class AbstractISegmentList extends ArrayList<ISqlSegment> implements ISqlSegment, StringPool
SQL 片段集合 处理的抽象类
Since:
2018-06-27
Author:
miemie
See Also:
  • Constructor Details

    • AbstractISegmentList

      public AbstractISegmentList()
  • Method Details

    • addAll

      public boolean addAll(Collection<? extends ISqlSegment> c)
      重写方法,做个性化适配
      Specified by:
      addAll in interface Collection<ISqlSegment>
      Specified by:
      addAll in interface List<ISqlSegment>
      Overrides:
      addAll in class ArrayList<ISqlSegment>
      Parameters:
      c - 元素集合
      Returns:
      是否添加成功
    • transformList

      protected abstract boolean transformList(List<ISqlSegment> list, ISqlSegment firstSegment, ISqlSegment lastSegment)
      在其中对值进行判断以及更改 list 的内部元素
      Parameters:
      list - 传入进来的 ISqlSegment 集合
      firstSegment - ISqlSegment 集合里第一个值
      lastSegment - ISqlSegment 集合里最后一个值
      Returns:
      true 是否继续向下执行; false 不再向下执行
    • getSqlSegment

      public String getSqlSegment()
      Description copied from interface: ISqlSegment
      SQL 片段
      Specified by:
      getSqlSegment in interface ISqlSegment
    • childrenSqlSegment

      protected abstract String childrenSqlSegment()
      只有该类进行过 addAll 操作,才会触发这个方法

      方法内可以放心进行操作

      Returns:
      sqlSegment
    • clear

      public void clear()
      Specified by:
      clear in interface Collection<ISqlSegment>
      Specified by:
      clear in interface List<ISqlSegment>
      Overrides:
      clear in class ArrayList<ISqlSegment>
    • clearSqlSegmentCache

      public void clearSqlSegmentCache()
    • changeParamAlias

      public void changeParamAlias(String oldParamAlias, String paramAlias)