fr.cnes.sitools.dataset.database.jdbc
Interface RequestSql

All Known Implementing Classes:
RequestMysql, RequestPostgres

public interface RequestSql

SQL interface to insure basic methods

Author:
AKKA Technologies

Method Summary
 java.lang.String convertColumnToString(Column attribute)
          Built the left part of the filter SQL
 java.lang.String convertColumnToStringAttribute(Column attribute)
          Built the left part of the filter SQL
 java.lang.String getAttributes(java.util.List<Column> columnVisible)
          Get the attributes of the request
 java.lang.String getFilter(Predicat predicat)
          Convert a predicate to a SQL filter
 java.lang.String getFromClauseAdvanced(SitoolsStructure structure)
          Get from clause
 java.lang.String getNodeFrom(java.util.List<StructureNodeComplete> nodeList, int level, java.lang.String parentheseFermante)
          Get the node from the node list, the level and the closing parenthesis
 java.lang.String getOrderBy(DataSet ds)
          Get the order by defined
 java.lang.String getWhereClause(java.util.List<Predicat> predicats, java.util.List<Column> columns)
          Get the WHERE clause
 java.lang.String typeJointureToString(TypeJointure typeJointure)
          Transform a join type to string
 

Method Detail

getAttributes

java.lang.String getAttributes(java.util.List<Column> columnVisible)
Get the attributes of the request

Parameters:
columnVisible - list of visible columns
Returns:
attributes

getFromClauseAdvanced

java.lang.String getFromClauseAdvanced(SitoolsStructure structure)
Get from clause

Parameters:
structure - a SitoolsStructure
Returns:
the clause

getWhereClause

java.lang.String getWhereClause(java.util.List<Predicat> predicats,
                                java.util.List<Column> columns)
Get the WHERE clause

Parameters:
predicats - a list of predicates
columns - a list of columns
Returns:
the WHERE clause

getFilter

java.lang.String getFilter(Predicat predicat)
Convert a predicate to a SQL filter

Parameters:
predicat - the predicate
Returns:
the filter

getOrderBy

java.lang.String getOrderBy(DataSet ds)
Get the order by defined

Parameters:
ds - the primary keys defined in the request
Returns:
the ORDER BY clause

convertColumnToStringAttribute

java.lang.String convertColumnToStringAttribute(Column attribute)
Built the left part of the filter SQL

Parameters:
attribute - the column
Returns:
the left part of SQL filter

convertColumnToString

java.lang.String convertColumnToString(Column attribute)
Built the left part of the filter SQL

Parameters:
attribute - the column
Returns:
the left part of SQL filter

typeJointureToString

java.lang.String typeJointureToString(TypeJointure typeJointure)
Transform a join type to string

Parameters:
typeJointure - the join type
Returns:
the corresponding string for the implemented request type

getNodeFrom

java.lang.String getNodeFrom(java.util.List<StructureNodeComplete> nodeList,
                             int level,
                             java.lang.String parentheseFermante)
Get the node from the node list, the level and the closing parenthesis

Parameters:
nodeList - the list of nodes
level - the level
parentheseFermante - the closing parenthesis
Returns:
The node


Copyright © 2010-2013 CNES. All Rights Reserved.