Class CountAll

  • All Implemented Interfaces:
    BasicColumn

    public class CountAll
    extends java.lang.Object
    implements BasicColumn
    CountAll seems like the other aggregates, but it is special because there is no column. Rather than dealing with a useless and confusing abstraction, we simply implement BasicColumn directly.
    Author:
    Jeff Butler
    • Constructor Summary

      Constructors 
      Constructor Description
      CountAll()  
    • Method Summary

      Modifier and Type Method Description
      java.util.Optional<java.lang.String> alias()
      Returns the columns alias if one has been specified.
      CountAll as​(java.lang.String alias)
      Returns a new instance of a BasicColumn with the alias set.
      java.lang.String renderWithTableAlias​(TableAliasCalculator tableAliasCalculator)
      Returns the name of the item aliased with a table name if appropriate.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CountAll

        public CountAll()
    • Method Detail

      • renderWithTableAlias

        public java.lang.String renderWithTableAlias​(TableAliasCalculator tableAliasCalculator)
        Description copied from interface: BasicColumn
        Returns the name of the item aliased with a table name if appropriate. For example, "a.foo". This is appropriate for where clauses and order by clauses.
        Specified by:
        renderWithTableAlias in interface BasicColumn
        Parameters:
        tableAliasCalculator - the table alias calculator for the current renderer
        Returns:
        the item name with the table alias applied
      • alias

        public java.util.Optional<java.lang.String> alias()
        Description copied from interface: BasicColumn
        Returns the columns alias if one has been specified.
        Specified by:
        alias in interface BasicColumn
        Returns:
        the column alias
      • as

        public CountAll as​(java.lang.String alias)
        Description copied from interface: BasicColumn
        Returns a new instance of a BasicColumn with the alias set.
        Specified by:
        as in interface BasicColumn
        Parameters:
        alias - the column alias to set
        Returns:
        new instance with alias set