Package tilda.parsing.parts
Class View
- java.lang.Object
-
- tilda.parsing.parts.Base
-
- tilda.parsing.parts.View
-
public class View extends Base
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
View.DepWrapper
-
Field Summary
Fields Modifier and Type Field Description java.lang.String
_CountStarDeprecated
java.util.Map<java.lang.String,Base>
_Dependencies
ViewDistinctOn
_DistinctOn
java.util.List<Formula>
_Formulas
java.util.regex.Pattern
_FormulasRegEx
java.util.List<FormulaTemplate>
_FormulaTemplates
java.lang.String[]
_ImportFormulas
java.util.List<ViewJoin>
_Joins
boolean
_OCC
java.util.List<ViewColumn>
_PivotColumns
java.util.List<ViewPivotColumn>
_PivotColumnsDeprecated
java.util.List<ViewPivot>
_Pivots
ViewPivot
_PivotSingle
PrimaryKey
_PK
ViewRealize
_Realize
SubWhereClause
_SubQuery
java.lang.String
_SubWhere
SubWhereX
_SubWhereX
ViewTimeSeries
_TimeSeries
java.util.List<ViewColumn>
_ViewColumns
java.util.regex.Pattern
_ViewColumnsRegEx
-
Fields inherited from class tilda.parsing.parts.Base
_AppDataClassName, _AppFactoryClassName, _BaseClassName, _Description, _DescriptionX, _EntityClass, _HasUniqueQuery, _JsonDEPRECATED, _Masks, _Mode, _ModeStr, _Name, _OriginalDescription, _OriginalName, _OutputMaps, _PadderColumnNames, _ParentSchema, _Prefix, _Queries, _RealizedObj, _RealizedView, _ReferenceTag, _ReferenceUrl, _ShortAlias_DEPRECATED, _TenantInit, _TildaType, _Validated
-
-
Constructor Summary
Constructors Constructor Description View()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
copyAdvancedViewColumnFields(ViewColumn VC, ViewColumn NewVC)
Copies field values from VC to NewVC.static ViewColumn
createTZ(ParserSession PS, ViewColumn VC)
java.util.Set<View>
getAncestorRealizedViews()
Returns a set of the views directly referenced by this view that are not realized, but have an ancestor that is, or null if no such views were found.Column
getColumn(java.lang.String name)
java.lang.String[]
getColumnNames()
Graph<View.DepWrapper>
getDependencyGraph(boolean onlyRealizedViews)
java.util.Set<View>
getFirstAncestorRealizedViews()
Returns a set of the first ancestor views referenced by this view that are realized.java.lang.String[]
getFirstIdentityColumnNames(boolean naturalIdentitiesFirst)
Returns the list of columns that represent the first identity of the object.Formula
getFormula(java.lang.String FormulaName)
Formula
getFormula(java.lang.String FormulaName, boolean deep)
ObjectLifecycle
getLifecycle()
Column
getProxyColumn(java.lang.String name)
java.lang.String
getRealizedTableName(boolean includeSchemaName)
java.lang.String
getRootViewName()
java.util.Set<View>
getSubRealizedViewRootNames()
Returns a list of the views directly referenced by this view that are realized, or null if no such views were found.ViewColumn
getViewColumn(java.lang.String name)
ViewJoin
getViewjoin(java.lang.String ObjectName, java.lang.String As)
java.lang.String
getViewSubRealizeFullName()
The full schema.name of the _R parallel view as per getViewSubRealizeSchemaName() and getViewSubRealizeViewName().java.lang.String
getViewSubRealizeSchemaName()
The schema name for _R parallel views, currently TILTATMP.java.lang.String
getViewSubRealizeViewName()
The name of the _R view, as this view's "[schemaname]_[name]_R"boolean
hasAncestorRealizedViews()
Checks whether this view has a dependency on realized views, and as such, a parallel _R view should be, or has been, created.boolean
isOCC()
java.lang.String
toString()
protected static void
updateTzColDescriptions(View V)
Descriptions for TZColumns are a bit more complicated when dealing with views.boolean
validate(ParserSession PS, Schema ParentSchema)
-
Methods inherited from class tilda.parsing.parts.Base
expandColumnNames, expandColumnNames, getAppDataClassName, getAppFactoryClassName, getBaseClassName, getBaseName, getColumnPad, getFullName, getOutputMap, getQuery, getSchema, getShortName, hasMasking, validateMasks, validateOutputMaps, validateQueries
-
-
-
-
Field Detail
-
_ViewColumns
@SerializedName("columns") public java.util.List<ViewColumn> _ViewColumns
-
_Joins
@SerializedName("joins") public java.util.List<ViewJoin> _Joins
-
_SubWhere
@SerializedName("subWhere") public java.lang.String _SubWhere
-
_SubWhereX
@SerializedName("subWhereX") public SubWhereX _SubWhereX
-
_SubQuery
@SerializedName("subQuery") public SubWhereClause _SubQuery
-
_CountStarDeprecated
@SerializedName("countStar") public java.lang.String _CountStarDeprecated
-
_PivotSingle
@SerializedName("pivot") public ViewPivot _PivotSingle
-
_Pivots
@SerializedName("pivots") public java.util.List<ViewPivot> _Pivots
-
_TimeSeries
@SerializedName("timeSeries") public ViewTimeSeries _TimeSeries
-
_DistinctOn
@SerializedName("distinctOn") public ViewDistinctOn _DistinctOn
-
_PivotColumnsDeprecated
@SerializedName("pivotColumns") public java.util.List<ViewPivotColumn> _PivotColumnsDeprecated
-
_Realize
@SerializedName("realize") public ViewRealize _Realize
-
_ImportFormulas
@SerializedName("importFormulas") public java.lang.String[] _ImportFormulas
-
_Formulas
@SerializedName("formulaColumns") public java.util.List<Formula> _Formulas
-
_FormulaTemplates
@SerializedName("formulaTemplates") public java.util.List<FormulaTemplate> _FormulaTemplates
-
_OCC
public transient boolean _OCC
-
_PK
public transient PrimaryKey _PK
-
_ViewColumnsRegEx
public transient java.util.regex.Pattern _ViewColumnsRegEx
-
_FormulasRegEx
public transient java.util.regex.Pattern _FormulasRegEx
-
_Dependencies
public transient java.util.Map<java.lang.String,Base> _Dependencies
-
_PivotColumns
public transient java.util.List<ViewColumn> _PivotColumns
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getViewColumn
public ViewColumn getViewColumn(java.lang.String name)
-
getProxyColumn
public Column getProxyColumn(java.lang.String name)
-
getColumnNames
public java.lang.String[] getColumnNames()
- Specified by:
getColumnNames
in classBase
-
getLifecycle
public ObjectLifecycle getLifecycle()
- Specified by:
getLifecycle
in classBase
-
getViewjoin
public ViewJoin getViewjoin(java.lang.String ObjectName, java.lang.String As)
-
getRealizedTableName
public java.lang.String getRealizedTableName(boolean includeSchemaName)
-
getRootViewName
public java.lang.String getRootViewName()
-
validate
public boolean validate(ParserSession PS, Schema ParentSchema)
-
createTZ
public static ViewColumn createTZ(ParserSession PS, ViewColumn VC)
-
updateTzColDescriptions
protected static void updateTzColDescriptions(View V)
Descriptions for TZColumns are a bit more complicated when dealing with views. The whole view needs to be fully constructed before we can update the description to accurately describe which column a TzCol corresponds to. *- Parameters:
V
-
-
copyAdvancedViewColumnFields
protected void copyAdvancedViewColumnFields(ViewColumn VC, ViewColumn NewVC)
Copies field values from VC to NewVC. Handles _AggregateStr, _FormulaOnly, _JoinOnly, _Coalesce, _Distinct _OrderBy, _Filter, _Expression, _TypeStr, _Size, _Scale, _Precision.- Parameters:
VC
-NewVC
-
-
getFormula
public Formula getFormula(java.lang.String FormulaName)
-
getFormula
public Formula getFormula(java.lang.String FormulaName, boolean deep)
-
getDependencyGraph
public Graph<View.DepWrapper> getDependencyGraph(boolean onlyRealizedViews)
-
getSubRealizedViewRootNames
public java.util.Set<View> getSubRealizedViewRootNames()
Returns a list of the views directly referenced by this view that are realized, or null if no such views were found.- Returns:
-
getAncestorRealizedViews
public java.util.Set<View> getAncestorRealizedViews()
Returns a set of the views directly referenced by this view that are not realized, but have an ancestor that is, or null if no such views were found.- Returns:
-
getFirstAncestorRealizedViews
public java.util.Set<View> getFirstAncestorRealizedViews()
Returns a set of the first ancestor views referenced by this view that are realized. if no such views were found.- Returns:
-
hasAncestorRealizedViews
public boolean hasAncestorRealizedViews()
Checks whether this view has a dependency on realized views, and as such, a parallel _R view should be, or has been, created.- Returns:
-
getViewSubRealizeSchemaName
public java.lang.String getViewSubRealizeSchemaName()
The schema name for _R parallel views, currently TILTATMP.- Returns:
-
getViewSubRealizeViewName
public java.lang.String getViewSubRealizeViewName()
The name of the _R view, as this view's "[schemaname]_[name]_R"- Returns:
-
getViewSubRealizeFullName
public java.lang.String getViewSubRealizeFullName()
The full schema.name of the _R parallel view as per getViewSubRealizeSchemaName() and getViewSubRealizeViewName(). Only makes sense if hasAncestorRealizedViews() returns true, otherwise, this _R view wouldn't need to exist.- Returns:
-
getFirstIdentityColumnNames
public java.lang.String[] getFirstIdentityColumnNames(boolean naturalIdentitiesFirst)
Description copied from class:Base
Returns the list of columns that represent the first identity of the object. If a PK is defined, the columns defined for it will be returned. Otherwise, the columns for the first defined unique index will be returned. Null is returned otherwise, that that should never happen because all Objects are required to have at least one identity.
This method should only be called AFTERObject.validate(ParserSession, Schema)
has been called first.- Specified by:
getFirstIdentityColumnNames
in classBase
- Returns:
-
-