Package tilda.parsing.parts
Class ViewColumn
- java.lang.Object
- 
- tilda.parsing.parts.ViewColumn
 
- 
 public class ViewColumn extends java.lang.Object
- 
- 
Field SummaryFields Modifier and Type Field Description AggregateType_Aggregatejava.lang.String_AggregateAttributesjava.lang.String_AggregateStrjava.lang.String_Asjava.lang.String[]_Blockjava.lang.String_Coalescejava.lang.String_Descriptionjava.lang.Boolean_Distinctjava.lang.String[]_Excludejava.lang.String_Expressionboolean_FailedValidationFrameworkColumnType_FCTjava.lang.String_Filterboolean_FormulaOnlyJoinType_Joinboolean_JoinOnlyjava.lang.String_JoinStrjava.lang.String_MaskDefjava.lang.String_Namejava.lang.String_NameInnerjava.lang.String[]_OrderByjava.util.List<OrderBy>_OrderByObjsView_ParentViewjava.lang.String[]_PartitionByjava.util.List<Column>_partitionByObjsjava.lang.String_Postfixjava.lang.Integer_Precisionjava.lang.String_PrefixColumn_ProxyColjava.lang.String_Rangeprotected static java.util.regex.Pattern_RANGEREGEXjava.lang.String_SameAsjava.lang.String_Sameas_DEPRECATEDColumn_SameAsObjView_SameAsViewjava.lang.Integer_Scalejava.lang.Integer_SizeTypeDef_Typejava.lang.String_TypeStrboolean_UseEnumboolean_UseMapper
 - 
Constructor SummaryConstructors Constructor Description ViewColumn()
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanFixSameAs(ParserSession PS)Handles deprecated "sameas" and replaces with "sameAs" if appropriate.java.lang.StringgetAggregateName()java.lang.StringgetFullName()java.lang.StringgetName()java.lang.StringgetShortName()intgetSize()If the ViewColumn defines an expression and type, returns that.ColumnTypegetType()Returns the final type of the view column, which is the expression's type if defined, or else sameAs' type.java.lang.StringgetTzName(boolean sameAs)Returns the name of the associated TZ column for this column.booleanisCollection()booleanisList()booleanisNullable()booleanisSameAsLitteral()booleanisSet()booleanneedsTZ()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.booleanneedsTZBaseTypeNoAggregate()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 fromneedsTZ()is that it does not take into account aggregations and looks at the underlying type only.static java.lang.StringPrintColumnList(java.util.List<ViewColumn> L)returns a comma-separated string containing the unescaped column short namesjava.lang.StringtoString()booleanvalidate(ParserSession PS, View ParentView)static booleanvalidateRange(ParserSession PS, java.lang.String viewColumnName, java.lang.String range)static ColumnValidateSameAs(ParserSession PS, java.lang.String ColFullName, java.lang.String SameAs, View ParentView)
 
- 
- 
- 
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
 - 
_ParentViewpublic transient View _ParentView 
 - 
_SameAsObjpublic transient Column _SameAsObj 
 - 
_SameAsViewpublic transient View _SameAsView 
 - 
_Joinpublic transient JoinType _Join 
 - 
_Aggregatepublic transient AggregateType _Aggregate 
 - 
_AggregateAttributespublic transient java.lang.String _AggregateAttributes 
 - 
_OrderByObjspublic transient java.util.List<OrderBy> _OrderByObjs 
 - 
_partitionByObjspublic transient java.util.List<Column> _partitionByObjs 
 - 
_Typepublic transient TypeDef _Type 
 - 
_NameInnerpublic transient java.lang.String _NameInner 
 - 
_MaskDefpublic transient java.lang.String _MaskDef 
 - 
_FailedValidationpublic transient boolean _FailedValidation 
 - 
_FCTpublic transient FrameworkColumnType _FCT 
 - 
_ProxyColpublic transient Column _ProxyCol 
 - 
_RANGEREGEXprotected static final java.util.regex.Pattern _RANGEREGEX 
 
- 
 - 
Method Detail- 
getFullNamepublic java.lang.String getFullName() 
 - 
getShortNamepublic java.lang.String getShortName() 
 - 
getNamepublic java.lang.String getName() 
 - 
getAggregateNamepublic java.lang.String getAggregateName() 
 - 
getTypepublic 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:
 
 - 
getSizepublic int getSize() If the ViewColumn defines an expression and type, returns that. Otherwise, it returns the aggregate or original type.- Returns:
 
 - 
FixSameAspublic boolean FixSameAs(ParserSession PS) Handles deprecated "sameas" and replaces with "sameAs" if appropriate.- Parameters:
- PS-
- Returns:
 
 - 
validatepublic boolean validate(ParserSession PS, View ParentView) 
 - 
validateRangepublic static boolean validateRange(ParserSession PS, java.lang.String viewColumnName, java.lang.String range) 
 - 
ValidateSameAspublic static Column ValidateSameAs(ParserSession PS, java.lang.String ColFullName, java.lang.String SameAs, View ParentView) 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 - 
isSameAsLitteralpublic boolean isSameAsLitteral() 
 - 
PrintColumnListpublic static java.lang.String PrintColumnList(java.util.List<ViewColumn> L) returns a comma-separated string containing the unescaped column short names- Parameters:
- L-
- Returns:
 
 - 
needsTZpublic 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:
 
 - 
needsTZBaseTypeNoAggregatepublic 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.
 needsTZ()is that it does not take into account aggregations and looks at the underlying type only.- Returns:
 
 - 
isListpublic boolean isList() 
 - 
isSetpublic boolean isSet() 
 - 
isCollectionpublic boolean isCollection() 
 - 
isNullablepublic boolean isNullable() 
 - 
getTzNamepublic 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"]
 - 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:
 
 
- 
 
-