org.gcube.portlets.user.tdw.server.datasource.jdbc.dialect
Class AbstractSQLDialect

java.lang.Object
  extended by org.gcube.portlets.user.tdw.server.datasource.jdbc.dialect.AbstractSQLDialect
All Implemented Interfaces:
SQLDialect
Direct Known Subclasses:
Derby_10_7_SQLDialect, GenericSQLDialect, MySQL_5_x_x_SQLDialect, PostgresSQL_8_x_x_SQLDialect

public abstract class AbstractSQLDialect
extends Object
implements SQLDialect

Author:
"Federico De Faveri defaveri@isti.cnr.it"

Field Summary
protected  org.apache.log4j.Logger logger
           
 
Constructor Summary
AbstractSQLDialect()
           
 
Method Summary
 PreparedStatement createDataPreparedStatement(Connection connection, String tableName, String sortingColumn, Direction sortingDirection, int start, int limit)
          
abstract  String getDataQuery(String tableName, String sortingColumn, Direction sortingDirection)
          Returns a query for table data selection.
 void setDataPreparedStatementParameters(PreparedStatement preparedStatement, String tableName, String sortingColumn, Direction sortingDirection, int start, int limit)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.gcube.portlets.user.tdw.server.datasource.jdbc.dialect.SQLDialect
getName, getTableSizeQuery, supportDataBase
 

Field Detail

logger

protected org.apache.log4j.Logger logger
Constructor Detail

AbstractSQLDialect

public AbstractSQLDialect()
Method Detail

setDataPreparedStatementParameters

public void setDataPreparedStatementParameters(PreparedStatement preparedStatement,
                                               String tableName,
                                               String sortingColumn,
                                               Direction sortingDirection,
                                               int start,
                                               int limit)
                                        throws SQLException

Specified by:
setDataPreparedStatementParameters in interface SQLDialect
Throws:
SQLException

createDataPreparedStatement

public PreparedStatement createDataPreparedStatement(Connection connection,
                                                     String tableName,
                                                     String sortingColumn,
                                                     Direction sortingDirection,
                                                     int start,
                                                     int limit)
                                              throws SQLException

Specified by:
createDataPreparedStatement in interface SQLDialect
Throws:
SQLException

getDataQuery

public abstract String getDataQuery(String tableName,
                                    String sortingColumn,
                                    Direction sortingDirection)
Returns a query for table data selection.

Parameters:
tableName -
sortingColumn - the sorting column, can be null.
sortingDirection - the sorting direction, can be null.
Returns:


Copyright © 2013. All Rights Reserved.