Class ViewColumn


  • public class ViewColumn
    extends java.lang.Object
    • Field Detail

      • _Name

        @SerializedName("name")
        public java.lang.String _Name
      • _Sameas_DEPRECATED

        @SerializedName("sameas")
        public java.lang.String _Sameas_DEPRECATED
      • _SameAs

        @SerializedName("sameAs")
        public java.lang.String _SameAs
      • _As

        @SerializedName("as")
        public java.lang.String _As
      • _Expression

        @SerializedName("expression")
        public java.lang.String _Expression
      • _TypeStr

        @SerializedName("type")
        public java.lang.String _TypeStr
      • _Precision

        @SerializedName("precision")
        public java.lang.Integer _Precision
      • _Scale

        @SerializedName("scale")
        public java.lang.Integer _Scale
      • _Size

        @SerializedName("size")
        public java.lang.Integer _Size
      • _Prefix

        @SerializedName("prefix")
        public java.lang.String _Prefix
      • _Postfix

        @SerializedName("postfix")
        public java.lang.String _Postfix
      • _Exclude

        @SerializedName("exclude")
        public java.lang.String[] _Exclude
      • _Block

        @SerializedName("block")
        public java.lang.String[] _Block
      • _JoinStr

        @SerializedName("joinType")
        public java.lang.String _JoinStr
      • _FormulaOnly

        @SerializedName("formulaOnly")
        public boolean _FormulaOnly
      • _JoinOnly

        @SerializedName("joinOnly")
        public boolean _JoinOnly
      • _AggregateStr

        @SerializedName("aggregate")
        public java.lang.String _AggregateStr
      • _OrderBy

        @SerializedName("orderBy")
        public java.lang.String[] _OrderBy
      • _PartitionBy

        @SerializedName("partitionBy")
        public java.lang.String[] _PartitionBy
      • _Range

        @SerializedName("range")
        public java.lang.String _Range
      • _Coalesce

        @SerializedName("coalesce")
        public java.lang.String _Coalesce
      • _Distinct

        @SerializedName("distinct")
        public java.lang.Boolean _Distinct
      • _Filter

        @SerializedName("filter")
        public java.lang.String _Filter
      • _UseMapper

        @SerializedName("useMapper")
        public boolean _UseMapper
      • _UseEnum

        @SerializedName("useEnum")
        public boolean _UseEnum
      • _Description

        @SerializedName("description")
        public java.lang.String _Description
      • _ParentView

        public transient View _ParentView
      • _SameAsObj

        public transient Column _SameAsObj
      • _SameAsView

        public transient View _SameAsView
      • _Join

        public transient JoinType _Join
      • _AggregateAttributes

        public transient java.lang.String _AggregateAttributes
      • _OrderByObjs

        public transient java.util.List<OrderBy> _OrderByObjs
      • _partitionByObjs

        public transient java.util.List<Column> _partitionByObjs
      • _Type

        public transient TypeDef _Type
      • _NameInner

        public transient java.lang.String _NameInner
      • _MaskDef

        public transient java.lang.String _MaskDef
      • _FailedValidation

        public transient boolean _FailedValidation
      • _ProxyCol

        public transient Column _ProxyCol
      • _RANGEREGEX

        protected static final java.util.regex.Pattern _RANGEREGEX
    • Constructor Detail

      • ViewColumn

        public ViewColumn()
    • Method Detail

      • getFullName

        public java.lang.String getFullName()
      • getShortName

        public java.lang.String getShortName()
      • getName

        public java.lang.String getName()
      • getAggregateName

        public java.lang.String getAggregateName()
      • getType

        public ColumnType getType()
        Returns the final type of the view column, which is the expression's type if defined, or else sameAs' type. Additionally, It takes into account whether an aggregate has been defined and how the type will be modified.
        Returns:
      • getSize

        public int getSize()
        If the ViewColumn defines an expression and type, returns that. Otherwise, it returns the aggregate or original type.
        Returns:
      • FixSameAs

        public boolean FixSameAs​(ParserSession PS)
        Handles deprecated "sameas" and replaces with "sameAs" if appropriate.
        Parameters:
        PS -
        Returns:
      • validateRange

        public static boolean validateRange​(ParserSession PS,
                                            java.lang.String viewColumnName,
                                            java.lang.String range)
      • ValidateSameAs

        public static Column ValidateSameAs​(ParserSession PS,
                                            java.lang.String ColFullName,
                                            java.lang.String SameAs,
                                            View ParentView)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • isSameAsLitteral

        public boolean isSameAsLitteral()
      • PrintColumnList

        public static java.lang.String PrintColumnList​(java.util.List<ViewColumn> L)
        returns a comma-separated string containing the unescaped column short names
        Parameters:
        L -
        Returns:
      • needsTZ

        public boolean needsTZ()
        A view column of type 'DATETIME' (or DATETIME_PLAIN) needs an extra timezone support field if:
        • the underlying column needs one,
        • and the view column is not an aggregate,
        • and does not have an expression unless it's of type datetime,
        • and is a non-framework-generated column.
        Returns:
      • needsTZBaseTypeNoAggregate

        public boolean needsTZBaseTypeNoAggregate()
        A view column of type 'DATETIME' (or DATETIME_PLAIN) needs an extra timezone support field if:
        • the underlying column needs one,
        • and does not have an expression unless it's of type datetime,
        • and is a non-framework-generated column.
        This method is different from needsTZ() is that it does not take into account aggregations and looks at the underlying type only.
        Returns:
      • isList

        public boolean isList()
      • isSet

        public boolean isSet()
      • isCollection

        public boolean isCollection()
      • isNullable

        public boolean isNullable()
      • getTzName

        public java.lang.String getTzName​(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: