Package ru.curs.celesta.score
Class AbstractView
- java.lang.Object
-
- ru.curs.celesta.score.NamedElement
-
- ru.curs.celesta.score.GrainElement
-
- ru.curs.celesta.score.DataGrainElement
-
- ru.curs.celesta.score.AbstractView
-
- All Implemented Interfaces:
HasColumns
- Direct Known Subclasses:
MaterializedView
,View
public abstract class AbstractView extends DataGrainElement
Base class for all view data elements.- Since:
- 2017-06-08
- Author:
- ioann
-
-
Field Summary
-
Fields inherited from class ru.curs.celesta.score.NamedElement
MAX_IDENTIFIER_LENGTH
-
-
Constructor Summary
Constructors Constructor Description AbstractView(GrainPart grainPart, String name)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Map<String,Expr>
getAggregateColumns()
int
getColumnIndex(String name)
Returns column index by column name.Column<?>
getColumnRef(String colName)
Returns column reference by column name.abstract Map<String,? extends ColumnMeta<?>>
getColumns()
Returns a map of columns of the view.List<AbstractSelectStmt>
getSegments()
void
selectScript(PrintWriter bw, SQLGenerator gen)
Writes SELECT script to the stream.-
Methods inherited from class ru.curs.celesta.score.DataGrainElement
delete
-
Methods inherited from class ru.curs.celesta.score.GrainElement
getGrain, getGrainPart
-
Methods inherited from class ru.curs.celesta.score.NamedElement
equals, getCelestaDoc, getName, getQuotedName, getQuotedNameIfNeeded, hashCode, limitName, limitName, setCelestaDoc
-
-
-
-
Constructor Detail
-
AbstractView
public AbstractView(GrainPart grainPart, String name) throws ParseException
- Throws:
ParseException
-
-
Method Detail
-
getSegments
public final List<AbstractSelectStmt> getSegments()
-
selectScript
public void selectScript(PrintWriter bw, SQLGenerator gen)
Writes SELECT script to the stream.- Parameters:
bw
- output streamgen
- SQL generator (visitor)
-
getColumns
public abstract Map<String,? extends ColumnMeta<?>> getColumns()
Returns a map of columns of the view.- Returns:
-
getColumnIndex
public int getColumnIndex(String name)
Returns column index by column name.- Parameters:
name
- column name.
-
-