fr.lri.bd.olap.dto
Class ViewDTO

java.lang.Object
  extended by fr.lri.bd.olap.dto.ViewDTO

public class ViewDTO
extends Object

View DTO represents View object for VERD plugin purposes

Author:
holubec

Constructor Summary
ViewDTO(String schema, boolean createView)
           
 
Method Summary
 void addColumn(String expression, String alias, String type, boolean classifier)
          Method adds new column into the list.
 void addJoin(String join)
           
 void addTable(String table)
           
 List<Column> getCols()
           
 String getCreateViewSQL()
          Method returns sql string for view creation.
 String getFullViewName()
           
 String getGrantRightsSQL()
           
 List<String> getJoins()
           
 String getSelectSQL()
           
 String getSchema()
           
 List<String> getTables()
           
 String getViewName()
           
 boolean isAllowedToCreateView()
           
 void setSelectSQL(String selectSQL)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ViewDTO

public ViewDTO(String schema,
               boolean createView)
Parameters:
schema -
createView -
Method Detail

getSelectSQL

public String getSelectSQL()
Returns:
sql string for select from this view

setSelectSQL

public void setSelectSQL(String selectSQL)
Parameters:
selectSQL - string for select from this view

getViewName

public String getViewName()
Returns:
name of this view

getFullViewName

public String getFullViewName()
Returns:
name of this view together with schema name

addColumn

public void addColumn(String expression,
                      String alias,
                      String type,
                      boolean classifier)
Method adds new column into the list.

Parameters:
expression - name of column
alias - alias of view
type - type of column (num, string, date, ..)
classifier - is column classifier?

getCols

public List<Column> getCols()
Returns:
list of columns

getCreateViewSQL

public String getCreateViewSQL()
Method returns sql string for view creation. After executing this method is presumption of creating of view, so select string of this object is changed to use new database view.

Returns:
sql string for view creation

getGrantRightsSQL

public String getGrantRightsSQL()
Returns:
grant sql string, which grants rights for BUCHI user on this view

getSchema

public String getSchema()
Returns:
RDBMS schema name

isAllowedToCreateView

public boolean isAllowedToCreateView()
Returns:
true, if is allowed in settings to make queries

getJoins

public List<String> getJoins()
Returns:
list of joins

addJoin

public void addJoin(String join)
Parameters:
join - join expression

getTables

public List<String> getTables()
Returns:
list of tables

addTable

public void addTable(String table)
Parameters:
table - table name