org.gcube.application.aquamaps.aquamapsservice.impl.db
Class PostGresSQLDBSession
java.lang.Object
org.gcube.application.aquamaps.aquamapsservice.impl.db.DBSession
org.gcube.application.aquamaps.aquamapsservice.impl.db.PostGresSQLDBSession
public class PostGresSQLDBSession
- extends DBSession
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)
|
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,
PagedRequestSettings.OrderDirection orderMode)
|
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,
PagedRequestSettings.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 |
PostGresSQLDBSession
public PostGresSQLDBSession(java.sql.Connection conn)
executeFilteredQuery
public java.sql.ResultSet executeFilteredQuery(java.util.List<Field> filters,
java.lang.String table,
java.lang.String orderColumn,
PagedRequestSettings.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
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,
PagedRequestSettings.OrderDirection orderMode)
throws java.lang.Exception
- Specified by:
getDistinct
in class DBSession
- Throws:
java.lang.Exception