MySQLDBSession
Date: 2012-07-06

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.gcube.application.aquamaps.aquamapsservice.impl.db
Class MySQLDBSession

    java.lang.Object
      org.gcube.application.aquamaps.aquamapsservice.impl.db.DBSession
          org.gcube.application.aquamaps.aquamapsservice.impl.db.MySQLDBSession

    public class MySQLDBSession

extends DBSession

Nested Class Summary

Nested classes/interfaces inherited from class org.gcube.application.aquamaps.aquamapsservice.impl.db.DBSession
`DBSession.ALTER_OPERATION, DBSession.ENGINE`

Constructor Summary
`MySQLDBSession(java.sql.Connection conn)`

Method Summary
`boolean` | `checkExist(java.lang.String tableName, java.util.List<Field> keys)`
`void` | `createLikeTable(java.lang.String newTableName, java.lang.String oldTable)`
`void` | `createTable(java.lang.String tableName, java.lang.String[] columnsAndConstraintDefinition)`
`void` | `createTable(java.lang.String tableName, java.lang.String[] columnsAndConstraintDefinition, int numParitions, java.lang.String partitioningKey, DBSession.ENGINE... engines)`
`int` | `deleteOperation(java.lang.String tableName, java.util.List<Field> filters)`
`java.sql.ResultSet` | `executeFilteredQuery(java.util.List<Field> filters, java.lang.String table, java.lang.String orderColumn, OrderDirection orderMode)`
`java.lang.String` | `exportTableToCSV(java.lang.String tableName, boolean hasHeaders)`
`java.sql.PreparedStatement` | `fillParameters(java.util.List<Field> fields, int parameterOffset, java.sql.PreparedStatement ps)`
`java.lang.Long` | `getCount(java.lang.String tableName, java.util.List<Field> filters)`
`java.sql.ResultSet` | `getDistinct(Field toSelect, java.util.List<Field> filters, java.lang.String table, java.lang.String orderColumn, OrderDirection orderMode)`
`java.sql.PreparedStatement` | `getFilterCellByAreaQuery(HSPECFields filterByCodeType, java.lang.String sourceTableName, java.lang.String destinationTableName)`
`java.sql.PreparedStatement` | `getPreparedStatementForInsertOnDuplicate(java.util.List<Field> fields, java.lang.String table, java.lang.Integer[] keyIndexes)`
`java.util.List<java.util.List<Field>>` | `insertOperation(java.lang.String tableName, java.util.List<java.util.List<Field>> rows)`
`int` | `updateOperation(java.lang.String tableName, java.util.List<java.util.List<Field>> keys, java.util.List<java.util.List<Field>> rows)`

Methods inherited from class org.gcube.application.aquamaps.aquamapsservice.impl.db.DBSession
`alterColumn, checkTableExist, close, commit, createIndex, deleteColumn, disableAutoCommit, disableKeys, dropTable, dropView, enableKeys, executeQuery, executeUpdate, getConnection, getInternalCredentials, getInternalDBSession, getPostGisCredentials, getPostGisDBSession, getPreparedStatementForDelete, getPreparedStatementForDISTINCT, getPreparedStatementForInsert, getPreparedStatementForInsertFromSelect, getPreparedStatementForQuery, getPreparedStatementForUpdate, getTableCount, preparedStatement`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MySQLDBSession

    public MySQLDBSession(java.sql.Connection conn)

Method Detail

### executeFilteredQuery

    public java.sql.ResultSet executeFilteredQuery(java.util.List<Field> filters,
                                                   java.lang.String table,
                                                   java.lang.String orderColumn,
                                                   OrderDirection orderMode)
                                            throws java.lang.Exception

  Specified by:
    `executeFilteredQuery` in class `DBSession`
  Throws:
    `java.lang.Exception`

### fillParameters

    public java.sql.PreparedStatement fillParameters(java.util.List<Field> fields,
                                                     int parameterOffset,
                                                     java.sql.PreparedStatement ps)
                                              throws java.sql.SQLException

  Specified by:
    `fillParameters` in class `DBSession`
  Throws:
    `java.sql.SQLException`

### checkExist

    public boolean checkExist(java.lang.String tableName,
                              java.util.List<Field> keys)
                       throws java.lang.Exception

  Specified by:
    `checkExist` in class `DBSession`
  Throws:
    `java.lang.Exception`

### deleteOperation

    public int deleteOperation(java.lang.String tableName,
                               java.util.List<Field> filters)
                        throws java.lang.Exception

  Specified by:
    `deleteOperation` in class `DBSession`
  Throws:
    `java.lang.Exception`

### getCount

    public java.lang.Long getCount(java.lang.String tableName,
                                   java.util.List<Field> filters)
                            throws java.lang.Exception

  Specified by:
    `getCount` in class `DBSession`
  Throws:
    `java.lang.Exception`

### getFilterCellByAreaQuery

    public java.sql.PreparedStatement getFilterCellByAreaQuery(HSPECFields filterByCodeType,
                                                               java.lang.String sourceTableName,
                                                               java.lang.String destinationTableName)
                                                        throws java.lang.Exception

  Specified by:
    `getFilterCellByAreaQuery` in class `DBSession`
  Throws:
    `java.lang.Exception`

### insertOperation

    public java.util.List<java.util.List<Field>> insertOperation(java.lang.String tableName,
                                                                 java.util.List<java.util.List<Field>> rows)
                                                          throws java.lang.Exception

  Specified by:
    `insertOperation` in class `DBSession`
  Throws:
    `java.lang.Exception`

### updateOperation

    public int updateOperation(java.lang.String tableName,
                               java.util.List<java.util.List<Field>> keys,
                               java.util.List<java.util.List<Field>> rows)
                        throws java.lang.Exception

  Specified by:
    `updateOperation` in class `DBSession`
  Throws:
    `java.lang.Exception`

### createTable

    public void createTable(java.lang.String tableName,
                            java.lang.String[] columnsAndConstraintDefinition,
                            int numParitions,
                            java.lang.String partitioningKey,
                            DBSession.ENGINE... engines)
                     throws java.lang.Exception

  Throws:
    `java.lang.Exception`

### createLikeTable

    public void createLikeTable(java.lang.String newTableName,
                                java.lang.String oldTable)
                         throws java.lang.Exception

  Specified by:
    `createLikeTable` in class `DBSession`
  Throws:
    `java.lang.Exception`

### createTable

    public void createTable(java.lang.String tableName,
                            java.lang.String[] columnsAndConstraintDefinition)
                     throws java.lang.Exception

  Specified by:
    `createTable` in class `DBSession`
  Throws:
    `java.lang.Exception`

### getPreparedStatementForInsertOnDuplicate

    public java.sql.PreparedStatement getPreparedStatementForInsertOnDuplicate(java.util.List<Field> fields,
                                                                               java.lang.String table,
                                                                               java.lang.Integer[] keyIndexes)
                                                                        throws java.lang.Exception

  Specified by:
    `getPreparedStatementForInsertOnDuplicate` in class `DBSession`
  Throws:
    `java.lang.Exception`

### getDistinct

    public java.sql.ResultSet getDistinct(Field toSelect,
                                          java.util.List<Field> filters,
                                          java.lang.String table,
                                          java.lang.String orderColumn,
                                          OrderDirection orderMode)
                                   throws java.lang.Exception

  Specified by:
    `getDistinct` in class `DBSession`
  Throws:
    `java.lang.Exception`

### exportTableToCSV

    public java.lang.String exportTableToCSV(java.lang.String tableName,
                                             boolean hasHeaders)
                                      throws java.lang.Exception

  Specified by:
    `exportTableToCSV` in class `DBSession`
  Throws:
    `java.lang.Exception`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD