Package ru.curs.celesta.score
Class MaterializedView
java.lang.Object
ru.curs.celesta.score.NamedElement
ru.curs.celesta.score.GrainElement
ru.curs.celesta.score.DataGrainElement
ru.curs.celesta.score.AbstractView
ru.curs.celesta.score.MaterializedView
- All Implemented Interfaces:
HasColumns,TableElement
Materialized view data element.
- Since:
- 2017-06-08
- Author:
- ioann
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringChecksum comment template.static final StringSystem field name that contains result of COUNT().Fields inherited from class ru.curs.celesta.score.NamedElement
MAX_IDENTIFIER_LENGTHFields inherited from interface ru.curs.celesta.score.TableElement
YOU_CANNOT_DROP_A_COLUMN_THAT_BELONGS_TO -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a column to the table.Column<?> Returns a column by its name or throws an exception with a message that the column is not found.Returns a map of columns of the view.Returns PK constraint name.Returns unmodified map of primary key columns.getTriggerName(TriggerType type) booleanWhether the table has primary key.booleanisGroupByColumn(String alias) voidremoveColumn(Column<?> column) Removes a column from the table.Methods inherited from class ru.curs.celesta.score.AbstractView
getAggregateColumns, getColumnIndex, getColumnRef, getSegments, selectScriptMethods inherited from class ru.curs.celesta.score.DataGrainElement
deleteMethods inherited from class ru.curs.celesta.score.GrainElement
getGrain, getGrainPartMethods inherited from class ru.curs.celesta.score.NamedElement
equals, getCelestaDoc, getName, getQuotedName, getQuotedNameIfNeeded, hashCode, limitName, limitName, setCelestaDocMethods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ru.curs.celesta.score.TableElement
getGrain, getName, getQuotedName, getQuotedNameIfNeeded
-
Field Details
-
SURROGATE_COUNT
System field name that contains result of COUNT().- See Also:
-
CHECKSUM_COMMENT_TEMPLATE
Checksum comment template.- See Also:
-
-
Constructor Details
-
MaterializedView
- Throws:
ParseException
-
-
Method Details
-
getSurrogateCount
-
getColumns
Description copied from class:AbstractViewReturns a map of columns of the view.- Specified by:
getColumnsin interfaceHasColumns- Specified by:
getColumnsin interfaceTableElement- Specified by:
getColumnsin classAbstractView- Returns:
-
getColumnRefNames
-
getColumn
Description copied from interface:TableElementReturns a column by its name or throws an exception with a message that the column is not found.- Specified by:
getColumnin interfaceTableElement- Parameters:
colName- column name- Returns:
- Throws:
ParseException- if a column with the specified name is not found in the table
-
addColumn
Description copied from interface:TableElementAdds a column to the table.- Specified by:
addColumnin interfaceTableElement- Parameters:
column- new column- Throws:
ParseException- if the column couldn't be added
-
removeColumn
Description copied from interface:TableElementRemoves a column from the table.- Specified by:
removeColumnin interfaceTableElement- Parameters:
column- existing column- Throws:
ParseException- if the column couldn't be removed
-
hasPrimeKey
public boolean hasPrimeKey()Description copied from interface:TableElementWhether the table has primary key.- Specified by:
hasPrimeKeyin interfaceTableElement- Returns:
-
getPkConstraintName
Description copied from interface:TableElementReturns PK constraint name.- Specified by:
getPkConstraintNamein interfaceTableElement- Returns:
-
getPrimaryKey
Description copied from interface:TableElementReturns unmodified map of primary key columns.- Specified by:
getPrimaryKeyin interfaceTableElement- Returns:
- map of column name -> column
-
getRefTable
-
isGroupByColumn
-
getSelectPartOfScript
-
getGroupByPartOfScript
-
getChecksum
-
getTriggerName
-