Class TzNameHelper


  • public class TzNameHelper
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      TzNameHelper()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getTzColumnNames​(java.util.List<Column> columns, Column col)
      Creates a description for a TzColumn to tie a DateTime column to its Tz col, which could be a unique column, or a shared row col based on tzMode.
      static java.lang.String getTzColumnNames​(java.util.List<ViewColumn> columns, ViewColumn col)
      Creates a description for a TzColumn to tie a DateTime column to its Tz col, which could be a unique column, or a shared row col based on tzMode.
      For views, this is a bit more complicated as multiple row-level rowTz columns may be imported from multiple source views/tables, and be further modified by aggregates and order-by clauses.
      static java.lang.String getTzName​(java.lang.String colName, Column sameAsObj, AggregateType agg, java.lang.String[] orderBys, boolean sameAs)
      Returns the name of the associated TZ column for this column.
      • Methods inherited from class java.lang.Object

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

      • TzNameHelper

        public TzNameHelper()
    • Method Detail

      • getTzName

        public static java.lang.String getTzName​(java.lang.String colName,
                                                 Column sameAsObj,
                                                 AggregateType agg,
                                                 java.lang.String[] orderBys,
                                                 boolean sameAs)
        Returns the name of the associated TZ column for this column. This should be called only if "needsTZ" returns true. For row columns, will rename the rowTZ based on the source table/view, or aggregate. For example:
        • sameAs="SomeTable1.DateTimeColumnWithRowTZ"
        • sameAs="SomeTable2.DateTimeColumnWithRowTZ"
        • sameAs="SomeTable1.DateTimeColumn1WithRowTZ", aggregate="FIRST", orderBy:["dt1"]
        • sameAs="SomeTable1.DateTimeColumn2WithRowTZ", aggregate="FIRST", orderBy:["dt2"]
        We need to make sure that in the resulting view has 4 instances of rowTZ because:
        • The first two come from 2 different tables, so their rowTZ might be different
        • The last 2 have a different orderBy, and so the matching rowTZ might again be different.
        Parameters:
        sameAs -
        Returns:
      • getTzColumnNames

        public static java.lang.String getTzColumnNames​(java.util.List<Column> columns,
                                                        Column col)
        Creates a description for a TzColumn to tie a DateTime column to its Tz col, which could be a unique column, or a shared row col based on tzMode.
        Parameters:
        columns -
        col -
        Returns:
      • getTzColumnNames

        public static java.lang.String getTzColumnNames​(java.util.List<ViewColumn> columns,
                                                        ViewColumn col)
        Creates a description for a TzColumn to tie a DateTime column to its Tz col, which could be a unique column, or a shared row col based on tzMode.
        For views, this is a bit more complicated as multiple row-level rowTz columns may be imported from multiple source views/tables, and be further modified by aggregates and order-by clauses.
        Parameters:
        columns -
        col -
        Returns: