tudresden.ocl.codegen.decl
Class View
java.lang.Object
tudresden.ocl.codegen.decl.Table
tudresden.ocl.codegen.decl.View
- public class View
- extends Table
A virtual table, which contains rows defined by an SQL Select statement
in terms of other tables. The class is a direct subclass of the Table
class and therefore provides the full range of functionality of a Table
including foreign key and primary key handling. Additionally, the table
names and the SQL Statement can be stored in a View object.
- Author:
- Sten Loecher
Nested classes inherited from class tudresden.ocl.codegen.decl.Table |
|
Fields inherited from class tudresden.ocl.codegen.decl.Table |
|
Methods inherited from class tudresden.ocl.codegen.decl.Table |
addColumn, addColumn, addColumn, addColumn, addReferringTable, attributes, getAllForeignKeyColumns, getAttributeColumn, getAttributeColumns, getColumnAttribute, getColumns, getColumnType, getForeignColumn, getForeignKeyColumns, getForeignKeyRepresentation, getForeignTable, getKeyColumns, getPrimaryKeyColumns, getPrimaryKeyRepresentation, getReferredTable, getTableName, isColumn, isForeignKeyColumn, isKeyColumn, isOptional, isPrimaryKeyColumn, removeColumn, removePrimaryKey, setColumnType, setForeignKey, setForeignKey, setForeignKey, setName, setOptional, setPrimaryKey |
tableNames
private List tableNames
- A List that contains all table names, which are used to specify
the SQL statement.
statement
private String statement
- The SQL statement.
description
private String description
- A description of the view object.
View
public View(String name)
- Parameters:
name
- the name of the view
View
public View(String name,
String statement,
List tableNames,
String description)
- Parameters:
name
- the name of the viewstatement
- the SQL statement (is allowed to be null, if it is not of interest)description
- a description of this object (is allowed to be null, if it is not of interest)
setStatement
public void setStatement(String statement)
- Parameters:
statement
- the SQL statement (is allowed to be null)
setTableNames
public void setTableNames(List tableNames)
getTableNames
public List getTableNames()
throws IllegalStateException
- Returns:
- a List that contains all table names, which are used to specify the SQL statement
- Throws:
IllegalStateException
- if no table names are specified
getStatement
public String getStatement()
throws IllegalStateException
- Returns:
- the SQL statement
- Throws:
IllegalStateException
- if no statement is specified
getDescription
public String getDescription()
- Returns:
- the description of this object
- Throws:
IllegalStateException
- if no description is specified
toString
public String toString()
- Overrides:
toString
in class Table
- Returns:
- a string representation of a view object
Submit a bug
Developed at the Dresden University of Technology.
This software is published under the GNU Lesser General Public License.