HibernateUtils

Overview | Package | Class | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.openswing.swing.util.server
Class HibernateUtils

    java.lang.Object
      org.openswing.swing.util.server.HibernateUtils

public class HibernateUtils
extends java.lang.Object

Title: OpenSwing Framework

Description: Helper class containing some utility methods useful when retrieving data for a grid.

Copyright: Copyright (C) 2006 Mauro Carniel

This file is part of OpenSwing Framework. This library is free software; you can redistribute it and/or modify it under the terms of the (LGPL) Lesser General Public License as published by the Free Software Foundation; GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. The author may be contacted at: maurocarniel@tin.it

Constructor Summary
`HibernateUtils()`

Method Summary

`static java.lang.String`

`applyFiltersAndSorter(java.util.Map filteredColumns, java.util.ArrayList currentSortedColumns, java.util.ArrayList currentSortedVersusColumns, java.lang.Class valueObjectType, java.lang.String baseSQL, java.util.ArrayList paramValues, java.util.ArrayList paramTypes, java.lang.String tableName, org.hibernate.SessionFactory sessions)`
Apply filtering and sorting conditions to the specified baseSQL and return a new baseSQL that contains those conditions too.

`static java.lang.String`

`applyFiltersAndSorter(java.util.Map filteredColumns, java.util.ArrayList currentSortedColumns, java.util.ArrayList currentSortedVersusColumns, java.lang.Class valueObjectType, java.lang.String select, java.lang.String from, java.lang.String where, java.lang.String group, java.lang.String having, java.lang.String order, java.util.ArrayList paramValues, java.util.ArrayList paramTypes, java.lang.String tableName, org.hibernate.SessionFactory sessions)`
Apply filtering and sorting conditions to the specified baseSQL and return a new baseSQL that contains those conditions too.

`static java.lang.String`

`applyFiltersAndSorter(java.util.Map decodedAttributes, java.util.Map filteredColumns, java.util.ArrayList currentSortedColumns, java.util.ArrayList currentSortedVersusColumns, java.lang.Class valueObjectType, java.lang.String baseSQL, java.util.ArrayList paramValues, java.util.ArrayList paramTypes, java.lang.String tableName, org.hibernate.SessionFactory sessions)`
Apply filtering and sorting conditions to the specified baseSQL and return a new baseSQL that contains those conditions too.

`static java.lang.String`

`applyFiltersAndSorter(java.util.Map decodedAttributes, java.util.Map filteredColumns, java.util.ArrayList currentSortedColumns, java.util.ArrayList currentSortedVersusColumns, java.lang.Class valueObjectType, java.lang.String select, java.lang.String from, java.lang.String where, java.lang.String group, java.lang.String having, java.lang.String order, java.util.ArrayList paramValues, java.util.ArrayList paramTypes, java.lang.String tableName, org.hibernate.SessionFactory sessions)`
Apply filtering and sorting conditions to the specified baseSQL and return a new baseSQL that contains those conditions too.

`static Response` | `getAllFromClass(java.lang.Class valueObjectClass, java.util.Map filteredColumns, java.util.ArrayList currentSortedColumns, java.util.ArrayList currentSortedVersusColumns, org.hibernate.FetchMode fetchMode, org.hibernate.Session sess)` Read all records from the result set, starting from the specified value object.
`static Response` | `getAllFromCriteria(java.util.Map filteredColumns, java.util.ArrayList currentSortedColumns, java.util.ArrayList currentSortedVersusColumns, org.hibernate.Criteria criteria, org.hibernate.Session sess)` Read all records from the result set, starting from the specified Criteria.

`static Response`

`getAllFromQuery(java.util.Map filteredColumns, java.util.ArrayList currentSortedColumns, java.util.ArrayList currentSortedVersusColumns, java.lang.Class valueObjectType, java.lang.String baseSQL, java.lang.Object[] paramValues, org.hibernate.type.Type[] paramTypes, java.lang.String tableName, org.hibernate.SessionFactory sessions, org.hibernate.Session sess)`
Read the whole result set, by applying filtering and sorting conditions + query parameters.

`static Response`

`getAllFromQuery(java.util.Map filteredColumns, java.util.ArrayList currentSortedColumns, java.util.ArrayList currentSortedVersusColumns, java.lang.Class valueObjectType, java.lang.String select, java.lang.String from, java.lang.String where, java.lang.String group, java.lang.String having, java.lang.String order, java.lang.Object[] paramValues, org.hibernate.type.Type[] paramTypes, java.lang.String tableName, org.hibernate.SessionFactory sessions, org.hibernate.Session sess)`
Read the whole result set, by applying filtering and sorting conditions + query parameters.

`static Response`

`getAllFromQuery(java.util.Map decodedAttributes, java.util.Map filteredColumns, java.util.ArrayList currentSortedColumns, java.util.ArrayList currentSortedVersusColumns, java.lang.Class valueObjectType, java.lang.String baseSQL, java.lang.Object[] paramValues, org.hibernate.type.Type[] paramTypes, java.lang.String tableName, org.hibernate.SessionFactory sessions, org.hibernate.Session sess)`
Read the whole result set, by applying filtering and sorting conditions + query parameters.

`static Response`

`getAllFromQuery(java.util.Map decodedAttributes, java.util.Map filteredColumns, java.util.ArrayList currentSortedColumns, java.util.ArrayList currentSortedVersusColumns, java.lang.Class valueObjectType, java.lang.String select, java.lang.String from, java.lang.String where, java.lang.String group, java.lang.String having, java.lang.String order, java.lang.Object[] paramValues, org.hibernate.type.Type[] paramTypes, java.lang.String tableName, org.hibernate.SessionFactory sessions, org.hibernate.Session sess)`
Read the whole result set, by applying filtering and sorting conditions + query parameters.

`static Response`

`getBlockFromClass(java.lang.Class valueObjectClass, java.util.Map filteredColumns, java.util.ArrayList currentSortedColumns, java.util.ArrayList currentSortedVersusColumns, int action, int startIndex, int blockSize, org.hibernate.FetchMode fetchMode, org.hibernate.Session sess)`
Read a block of records from the result set, starting from the specified value object.

`static Response`

`getBlockFromCriteria(java.util.Map filteredColumns, java.util.ArrayList currentSortedColumns, java.util.ArrayList currentSortedVersusColumns, int action, int startIndex, int blockSize, org.hibernate.Criteria criteria, org.hibernate.Session sess)`
Read a block of records from the result set, starting from the specified Criteria.

`static Response` | `getBlockFromQuery(java.lang.Class valueObjectClass, int action, int startIndex, int blockSize, org.hibernate.Query query, org.hibernate.Session sess)` Read a block of records from the result set, starting from a Query object.

`static Response`

`getBlockFromQuery(int action, int startIndex, int blockSize, java.util.Map filteredColumns, java.util.ArrayList currentSortedColumns, java.util.ArrayList currentSortedVersusColumns, java.lang.Class valueObjectType, java.lang.String baseSQL, java.lang.Object[] paramValues, org.hibernate.type.Type[] paramTypes, java.lang.String tableName, org.hibernate.SessionFactory sessions, org.hibernate.Session sess)`
Read a block of records from the result set, by applying filtering and sorting conditions + query parameters.

`static Response`

`getBlockFromQuery(int action, int startIndex, int blockSize, java.util.Map filteredColumns, java.util.ArrayList currentSortedColumns, java.util.ArrayList currentSortedVersusColumns, java.lang.Class valueObjectType, java.lang.String select, java.lang.String from, java.lang.String where, java.lang.String group, java.lang.String having, java.lang.String order, java.lang.Object[] paramValues, org.hibernate.type.Type[] paramTypes, java.lang.String tableName, org.hibernate.SessionFactory sessions, org.hibernate.Session sess)`
Read a block of records from the result set, by applying filtering and sorting conditions + query parameters.

`static Response`

`getBlockFromQuery(java.util.Map decodedAttributes, int action, int startIndex, int blockSize, java.util.Map filteredColumns, java.util.ArrayList currentSortedColumns, java.util.ArrayList currentSortedVersusColumns, java.lang.Class valueObjectType, java.lang.String baseSQL, java.lang.Object[] paramValues, org.hibernate.type.Type[] paramTypes, java.lang.String tableName, org.hibernate.SessionFactory sessions, org.hibernate.Session sess)`
Read a block of records from the result set, by applying filtering and sorting conditions + query parameters.

`static Response`

`getBlockFromQuery(java.util.Map decodedAttributes, int action, int startIndex, int blockSize, java.util.Map filteredColumns, java.util.ArrayList currentSortedColumns, java.util.ArrayList currentSortedVersusColumns, java.lang.Class valueObjectType, java.lang.String select, java.lang.String from, java.lang.String where, java.lang.String group, java.lang.String having, java.lang.String order, java.lang.Object[] paramValues, org.hibernate.type.Type[] paramTypes, java.lang.String tableName, org.hibernate.SessionFactory sessions, org.hibernate.Session sess)`
Read a block of records from the result set, by applying filtering and sorting conditions + query parameters.

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

Constructor Detail

### HibernateUtils

    public HibernateUtils()

Method Detail

### applyFiltersAndSorter

    public static java.lang.String applyFiltersAndSorter(java.util.Map filteredColumns,
                                                         java.util.ArrayList currentSortedColumns,
                                                         java.util.ArrayList currentSortedVersusColumns,
                                                         java.lang.Class valueObjectType,
                                                         java.lang.String baseSQL,
                                                         java.util.ArrayList paramValues,
                                                         java.util.ArrayList paramTypes,
                                                         java.lang.String tableName,
                                                         org.hibernate.SessionFactory sessions)
                                                  throws java.lang.Exception

  Apply filtering and sorting conditions to the specified baseSQL and return a new baseSQL that contains those conditions too.

  Parameters:
    `filteredColumns` - filtering conditions
    `currentSortedColumns` - sorting conditions (attribute names)
    `currentSortedVersusColumns` - sorting conditions (order versus)
    `valueObjectType` - value object type
    `baseSQL` - base SQL
    `paramValues` - parameters values, related to "?" in "baseSQL"
    `paramTypes` - parameters types, related to "?" in "baseSQL"
    `tableName` - table name related to baseSQL and v.o.
    `sessions` - SessionFactory
  Throws:
    `java.lang.Exception`

### applyFiltersAndSorter

    public static java.lang.String applyFiltersAndSorter(java.util.Map decodedAttributes,
                                                         java.util.Map filteredColumns,
                                                         java.util.ArrayList currentSortedColumns,
                                                         java.util.ArrayList currentSortedVersusColumns,
                                                         java.lang.Class valueObjectType,
                                                         java.lang.String baseSQL,
                                                         java.util.ArrayList paramValues,
                                                         java.util.ArrayList paramTypes,
                                                         java.lang.String tableName,
                                                         org.hibernate.SessionFactory sessions)
                                                  throws java.lang.Exception

  Apply filtering and sorting conditions to the specified baseSQL and return a new baseSQL that contains those conditions too.

  Parameters:
    `decodedAttributes` - collection of pairs ; if not specified, this method tries to automatically fetch mappings
    `filteredColumns` - filtering conditions
    `currentSortedColumns` - sorting conditions (attribute names)
    `currentSortedVersusColumns` - sorting conditions (order versus)
    `valueObjectType` - value object type
    `baseSQL` - base SQL
    `paramValues` - parameters values, related to "?" in "baseSQL"
    `paramTypes` - parameters types, related to "?" in "baseSQL"
    `tableName` - table name related to baseSQL and v.o.
    `sessions` - SessionFactory
  Throws:
    `java.lang.Exception`

### applyFiltersAndSorter

    public static java.lang.String applyFiltersAndSorter(java.util.Map filteredColumns,
                                                         java.util.ArrayList currentSortedColumns,
                                                         java.util.ArrayList currentSortedVersusColumns,
                                                         java.lang.Class valueObjectType,
                                                         java.lang.String select,
                                                         java.lang.String from,
                                                         java.lang.String where,
                                                         java.lang.String group,
                                                         java.lang.String having,
                                                         java.lang.String order,
                                                         java.util.ArrayList paramValues,
                                                         java.util.ArrayList paramTypes,
                                                         java.lang.String tableName,
                                                         org.hibernate.SessionFactory sessions)
                                                  throws java.lang.Exception

  Apply filtering and sorting conditions to the specified baseSQL and return a new baseSQL that contains those conditions too. SQL is expressed using more argument, each one without the related keyword (select, from, ...). Example: following query select customer_code,corporate_name from companiesVO order by customer_code asc become an invokation of getSql: getSql(userSessionPars,"customer_code,corporate_name","companiesVO","","customer_code asc","","",...);

  Parameters:
    `filteredColumns` - filtering conditions
    `currentSortedColumns` - sorting conditions (attribute names)
    `currentSortedVersusColumns` - sorting conditions (order versus)
    `valueObjectType` - value object type
    `select` - list of fields for select statement
    `from` - list of tables for from statement
    `where` - where statement; may be null
    `group` - group by statement; may be null
    `having` - having statement; may be null
    `order` - list of fields for order by statement; may be null
    `paramValues` - parameters values, related to "?" in "baseSQL"
    `paramTypes` - parameters types, related to "?" in "baseSQL"
    `tableName` - table name related to baseSQL and v.o.
    `sessions` - SessionFactory
  Throws:
    `java.lang.Exception`

### applyFiltersAndSorter

    public static java.lang.String applyFiltersAndSorter(java.util.Map decodedAttributes,
                                                         java.util.Map filteredColumns,
                                                         java.util.ArrayList currentSortedColumns,
                                                         java.util.ArrayList currentSortedVersusColumns,
                                                         java.lang.Class valueObjectType,
                                                         java.lang.String select,
                                                         java.lang.String from,
                                                         java.lang.String where,
                                                         java.lang.String group,
                                                         java.lang.String having,
                                                         java.lang.String order,
                                                         java.util.ArrayList paramValues,
                                                         java.util.ArrayList paramTypes,
                                                         java.lang.String tableName,
                                                         org.hibernate.SessionFactory sessions)
                                                  throws java.lang.Exception

  Apply filtering and sorting conditions to the specified baseSQL and return a new baseSQL that contains those conditions too. SQL is expressed using more argument, each one without the related keyword (select, from, ...). Example: following query select customer_code,corporate_name from companiesVO order by customer_code asc become an invokation of getSql: getSql(userSessionPars,"customer_code,corporate_name","companiesVO","","customer_code asc","","",...); If decodedAttributes is filled, then baseSQL can contains a HSQL query.

  Parameters:
    `decodedAttributes` - collection of pairs
    `filteredColumns` - filtering conditions
    `currentSortedColumns` - sorting conditions (attribute names)
    `currentSortedVersusColumns` - sorting conditions (order versus)
    `valueObjectType` - value object type
    `select` - list of fields for select statement
    `from` - list of tables for from statement
    `where` - where statement; may be null
    `group` - group by statement; may be null
    `having` - having statement; may be null
    `order` - list of fields for order by statement; may be null
    `paramValues` - parameters values, related to "?" in "baseSQL"
    `paramTypes` - parameters types, related to "?" in "baseSQL"
    `tableName` - table name related to baseSQL and v.o.
    `sessions` - SessionFactory
  Throws:
    `java.lang.Exception`

### getAllFromQuery

    public static Response getAllFromQuery(java.util.Map decodedAttributes,
                                           java.util.Map filteredColumns,
                                           java.util.ArrayList currentSortedColumns,
                                           java.util.ArrayList currentSortedVersusColumns,
                                           java.lang.Class valueObjectType,
                                           java.lang.String baseSQL,
                                           java.lang.Object[] paramValues,
                                           org.hibernate.type.Type[] paramTypes,
                                           java.lang.String tableName,
                                           org.hibernate.SessionFactory sessions,
                                           org.hibernate.Session sess)
                                    throws java.lang.Exception

  Read the whole result set, by applying filtering and sorting conditions + query parameters.

  Parameters:
    `decodedAttributes` - collection of pairs
    `filteredColumns` - filtering conditions
    `currentSortedColumns` - sorting conditions (attribute names)
    `currentSortedVersusColumns` - sorting conditions (order versus)
    `valueObjectType` - value object type
    `baseSQL` - base SQL
    `paramValues` - parameters values, related to "?" in "baseSQL" (optional)
    `paramTypes` - parameters types, related to "?" in "baseSQL" (optional)
    `tableName` - table name related to baseSQL and v.o.
    `sessions` - SessionFactory
    `sess` - Session
  Throws:
    `java.lang.Exception`

### getAllFromQuery

    public static Response getAllFromQuery(java.util.Map filteredColumns,
                                           java.util.ArrayList currentSortedColumns,
                                           java.util.ArrayList currentSortedVersusColumns,
                                           java.lang.Class valueObjectType,
                                           java.lang.String baseSQL,
                                           java.lang.Object[] paramValues,
                                           org.hibernate.type.Type[] paramTypes,
                                           java.lang.String tableName,
                                           org.hibernate.SessionFactory sessions,
                                           org.hibernate.Session sess)
                                    throws java.lang.Exception

  Read the whole result set, by applying filtering and sorting conditions + query parameters.

  Parameters:
    `filteredColumns` - filtering conditions
    `currentSortedColumns` - sorting conditions (attribute names)
    `currentSortedVersusColumns` - sorting conditions (order versus)
    `valueObjectType` - value object type
    `baseSQL` - base SQL
    `paramValues` - parameters values, related to "?" in "baseSQL" (optional)
    `paramTypes` - parameters types, related to "?" in "baseSQL" (optional)
    `tableName` - table name related to baseSQL and v.o.
    `sessions` - SessionFactory
    `sess` - Session
  Throws:
    `java.lang.Exception`

### getAllFromQuery

    public static Response getAllFromQuery(java.util.Map decodedAttributes,
                                           java.util.Map filteredColumns,
                                           java.util.ArrayList currentSortedColumns,
                                           java.util.ArrayList currentSortedVersusColumns,
                                           java.lang.Class valueObjectType,
                                           java.lang.String select,
                                           java.lang.String from,
                                           java.lang.String where,
                                           java.lang.String group,
                                           java.lang.String having,
                                           java.lang.String order,
                                           java.lang.Object[] paramValues,
                                           org.hibernate.type.Type[] paramTypes,
                                           java.lang.String tableName,
                                           org.hibernate.SessionFactory sessions,
                                           org.hibernate.Session sess)
                                    throws java.lang.Exception

  Read the whole result set, by applying filtering and sorting conditions + query parameters. SQL is expressed using more argument, each one without the related keyword (select, from, ...). Example: following query select customer_code,corporate_name from companiesVO order by customer_code asc become an invokation of getSql: getSql(userSessionPars,"customer_code,corporate_name","companiesVO","","customer_code asc","","",...);

  Parameters:
    `decodedAttributes` - collection of pairs
    `filteredColumns` - filtering conditions
    `currentSortedColumns` - sorting conditions (attribute names)
    `currentSortedVersusColumns` - sorting conditions (order versus)
    `valueObjectType` - value object type
    `select` - list of fields for select statement
    `from` - list of tables for from statement
    `where` - where statement; may be null
    `group` - group by statement; may be null
    `having` - having statement; may be null
    `order` - list of fields for order by statement; may be null
    `paramValues` - parameters values, related to "?" in "baseSQL" (optional)
    `paramTypes` - parameters types, related to "?" in "baseSQL" (optional)
    `tableName` - table name related to baseSQL and v.o.
    `sessions` - SessionFactory
    `sess` - Session
  Throws:
    `java.lang.Exception`

### getAllFromQuery

    public static Response getAllFromQuery(java.util.Map filteredColumns,
                                           java.util.ArrayList currentSortedColumns,
                                           java.util.ArrayList currentSortedVersusColumns,
                                           java.lang.Class valueObjectType,
                                           java.lang.String select,
                                           java.lang.String from,
                                           java.lang.String where,
                                           java.lang.String group,
                                           java.lang.String having,
                                           java.lang.String order,
                                           java.lang.Object[] paramValues,
                                           org.hibernate.type.Type[] paramTypes,
                                           java.lang.String tableName,
                                           org.hibernate.SessionFactory sessions,
                                           org.hibernate.Session sess)
                                    throws java.lang.Exception

  Read the whole result set, by applying filtering and sorting conditions + query parameters. SQL is expressed using more argument, each one without the related keyword (select, from, ...). Example: following query select customer_code,corporate_name from companiesVO order by customer_code asc become an invokation of getSql: getSql(userSessionPars,"customer_code,corporate_name","companiesVO","","customer_code asc","","",...);

  Parameters:
    `filteredColumns` - filtering conditions
    `currentSortedColumns` - sorting conditions (attribute names)
    `currentSortedVersusColumns` - sorting conditions (order versus)
    `valueObjectType` - value object type
    `select` - list of fields for select statement
    `from` - list of tables for from statement
    `where` - where statement; may be null
    `group` - group by statement; may be null
    `having` - having statement; may be null
    `order` - list of fields for order by statement; may be null
    `paramValues` - parameters values, related to "?" in "baseSQL" (optional)
    `paramTypes` - parameters types, related to "?" in "baseSQL" (optional)
    `tableName` - table name related to baseSQL and v.o.
    `sessions` - SessionFactory
    `sess` - Session
  Throws:
    `java.lang.Exception`

### getBlockFromQuery

    public static Response getBlockFromQuery(int action,
                                             int startIndex,
                                             int blockSize,
                                             java.util.Map filteredColumns,
                                             java.util.ArrayList currentSortedColumns,
                                             java.util.ArrayList currentSortedVersusColumns,
                                             java.lang.Class valueObjectType,
                                             java.lang.String baseSQL,
                                             java.lang.Object[] paramValues,
                                             org.hibernate.type.Type[] paramTypes,
                                             java.lang.String tableName,
                                             org.hibernate.SessionFactory sessions,
                                             org.hibernate.Session sess)
                                      throws java.lang.Exception

  Read a block of records from the result set, by applying filtering and sorting conditions + query parameters.

  Parameters:
    `action` - fetching versus: PREVIOUS_BLOCK_ACTION, NEXT_BLOCK_ACTION or LAST_BLOCK_ACTION
    `blockSize` - number of records to read
    `filteredColumns` - filtering conditions
    `currentSortedColumns` - sorting conditions (attribute names)
    `currentSortedVersusColumns` - sorting conditions (order versus)
    `valueObjectType` - value object type
    `baseSQL` - base SQL
    `paramValues` - parameters values, related to "?" in "baseSQL" (optional)
    `paramTypes` - parameters types, related to "?" in "baseSQL" (optional)
    `tableName` - table name related to baseSQL and v.o.
    `sessions` - SessionFactory
    `sess` - Session
  Throws:
    `java.lang.Exception`

### getBlockFromQuery

    public static Response getBlockFromQuery(java.util.Map decodedAttributes,
                                             int action,
                                             int startIndex,
                                             int blockSize,
                                             java.util.Map filteredColumns,
                                             java.util.ArrayList currentSortedColumns,
                                             java.util.ArrayList currentSortedVersusColumns,
                                             java.lang.Class valueObjectType,
                                             java.lang.String baseSQL,
                                             java.lang.Object[] paramValues,
                                             org.hibernate.type.Type[] paramTypes,
                                             java.lang.String tableName,
                                             org.hibernate.SessionFactory sessions,
                                             org.hibernate.Session sess)
                                      throws java.lang.Exception

  Read a block of records from the result set, by applying filtering and sorting conditions + query parameters.

  Parameters:
    `decodedAttributes` - collection of pairs
    `action` - fetching versus: PREVIOUS_BLOCK_ACTION, NEXT_BLOCK_ACTION or LAST_BLOCK_ACTION
    `blockSize` - number of records to read
    `filteredColumns` - filtering conditions
    `currentSortedColumns` - sorting conditions (attribute names)
    `currentSortedVersusColumns` - sorting conditions (order versus)
    `valueObjectType` - value object type
    `baseSQL` - base SQL
    `paramValues` - parameters values, related to "?" in "baseSQL" (optional)
    `paramTypes` - parameters types, related to "?" in "baseSQL" (optional)
    `tableName` - table name related to baseSQL and v.o.
    `sessions` - SessionFactory
    `sess` - Session
  Throws:
    `java.lang.Exception`

### getBlockFromQuery

    public static Response getBlockFromQuery(java.util.Map decodedAttributes,
                                             int action,
                                             int startIndex,
                                             int blockSize,
                                             java.util.Map filteredColumns,
                                             java.util.ArrayList currentSortedColumns,
                                             java.util.ArrayList currentSortedVersusColumns,
                                             java.lang.Class valueObjectType,
                                             java.lang.String select,
                                             java.lang.String from,
                                             java.lang.String where,
                                             java.lang.String group,
                                             java.lang.String having,
                                             java.lang.String order,
                                             java.lang.Object[] paramValues,
                                             org.hibernate.type.Type[] paramTypes,
                                             java.lang.String tableName,
                                             org.hibernate.SessionFactory sessions,
                                             org.hibernate.Session sess)
                                      throws java.lang.Exception

  Read a block of records from the result set, by applying filtering and sorting conditions + query parameters. SQL is expressed using more argument, each one without the related keyword (select, from, ...). Example: following query select customer_code,corporate_name from companiesVO order by customer_code asc become an invokation of getSql: getSql(userSessionPars,"customer_code,corporate_name","companiesVO","","customer_code asc","","",...);

  Parameters:
    `decodedAttributes` - collection of pairs
    `action` - fetching versus: PREVIOUS_BLOCK_ACTION, NEXT_BLOCK_ACTION or LAST_BLOCK_ACTION
    `blockSize` - number of records to read
    `filteredColumns` - filtering conditions
    `currentSortedColumns` - sorting conditions (attribute names)
    `currentSortedVersusColumns` - sorting conditions (order versus)
    `valueObjectType` - value object type
    `select` - list of fields for select statement
    `from` - list of tables for from statement
    `where` - where statement; may be null
    `group` - group by statement; may be null
    `having` - having statement; may be null
    `order` - list of fields for order by statement; may be null
    `paramValues` - parameters values, related to "?" in "baseSQL" (optional)
    `paramTypes` - parameters types, related to "?" in "baseSQL" (optional)
    `tableName` - table name related to baseSQL and v.o.
    `sessions` - SessionFactory
    `sess` - Session
  Throws:
    `java.lang.Exception`

### getBlockFromQuery

    public static Response getBlockFromQuery(int action,
                                             int startIndex,
                                             int blockSize,
                                             java.util.Map filteredColumns,
                                             java.util.ArrayList currentSortedColumns,
                                             java.util.ArrayList currentSortedVersusColumns,
                                             java.lang.Class valueObjectType,
                                             java.lang.String select,
                                             java.lang.String from,
                                             java.lang.String where,
                                             java.lang.String group,
                                             java.lang.String having,
                                             java.lang.String order,
                                             java.lang.Object[] paramValues,
                                             org.hibernate.type.Type[] paramTypes,
                                             java.lang.String tableName,
                                             org.hibernate.SessionFactory sessions,
                                             org.hibernate.Session sess)
                                      throws java.lang.Exception

  Read a block of records from the result set, by applying filtering and sorting conditions + query parameters. SQL is expressed using more argument, each one without the related keyword (select, from, ...). Example: following query select customer_code,corporate_name from companiesVO order by customer_code asc become an invokation of getSql: getSql(userSessionPars,"customer_code,corporate_name","companiesVO","","customer_code asc","","",...);

  Parameters:
    `action` - fetching versus: PREVIOUS_BLOCK_ACTION, NEXT_BLOCK_ACTION or LAST_BLOCK_ACTION
    `blockSize` - number of records to read
    `filteredColumns` - filtering conditions
    `currentSortedColumns` - sorting conditions (attribute names)
    `currentSortedVersusColumns` - sorting conditions (order versus)
    `valueObjectType` - value object type
    `select` - list of fields for select statement
    `from` - list of tables for from statement
    `where` - where statement; may be null
    `group` - group by statement; may be null
    `having` - having statement; may be null
    `order` - list of fields for order by statement; may be null
    `paramValues` - parameters values, related to "?" in "baseSQL" (optional)
    `paramTypes` - parameters types, related to "?" in "baseSQL" (optional)
    `tableName` - table name related to baseSQL and v.o.
    `sessions` - SessionFactory
    `sess` - Session
  Throws:
    `java.lang.Exception`

### getBlockFromQuery

    public static Response getBlockFromQuery(java.lang.Class valueObjectClass,
                                             int action,
                                             int startIndex,
                                             int blockSize,
                                             org.hibernate.Query query,
                                             org.hibernate.Session sess)
                                      throws java.lang.Exception

  Read a block of records from the result set, starting from a Query object.

  Parameters:
    `action` - fetching versus: PREVIOUS_BLOCK_ACTION, NEXT_BLOCK_ACTION or LAST_BLOCK_ACTION
    `blockSize` - number of records to read
    `query` - Query object
    `sess` - Session
  Throws:
    `java.lang.Exception`

### getBlockFromClass

    public static Response getBlockFromClass(java.lang.Class valueObjectClass,
                                             java.util.Map filteredColumns,
                                             java.util.ArrayList currentSortedColumns,
                                             java.util.ArrayList currentSortedVersusColumns,
                                             int action,
                                             int startIndex,
                                             int blockSize,
                                             org.hibernate.FetchMode fetchMode,
                                             org.hibernate.Session sess)
                                      throws java.lang.Exception

  Read a block of records from the result set, starting from the specified value object.

  Parameters:
    `valueObjectClass` - value object type
    `filteredColumns` - filtering conditions
    `currentSortedColumns` - sorting conditions (attribute names)
    `currentSortedVersusColumns` - sorting conditions (order versus)
    `action` - fetching versus: PREVIOUS_BLOCK_ACTION, NEXT_BLOCK_ACTION or LAST_BLOCK_ACTION
    `blockSize` - number of records to read
    `fetchMode` - FetchMode object, used to specificy how to retrieve inner objects; e.g. FetchMode.INNER
    `sess` - Session
  Throws:
    `java.lang.Exception`

### getBlockFromCriteria

    public static Response getBlockFromCriteria(java.util.Map filteredColumns,
                                                java.util.ArrayList currentSortedColumns,
                                                java.util.ArrayList currentSortedVersusColumns,
                                                int action,
                                                int startIndex,
                                                int blockSize,
                                                org.hibernate.Criteria criteria,
                                                org.hibernate.Session sess)
                                         throws java.lang.Exception

  Read a block of records from the result set, starting from the specified Criteria.

  Parameters:
    `filteredColumns` - filtering conditions
    `currentSortedColumns` - sorting conditions (attribute names)
    `currentSortedVersusColumns` - sorting conditions (order versus)
    `action` - fetching versus: PREVIOUS_BLOCK_ACTION, NEXT_BLOCK_ACTION or LAST_BLOCK_ACTION
    `blockSize` - number of records to read
    `criteria` - Criteria object to execute
    `sess` - Session
  Throws:
    `java.lang.Exception`

### getAllFromClass

    public static Response getAllFromClass(java.lang.Class valueObjectClass,
                                           java.util.Map filteredColumns,
                                           java.util.ArrayList currentSortedColumns,
                                           java.util.ArrayList currentSortedVersusColumns,
                                           org.hibernate.FetchMode fetchMode,
                                           org.hibernate.Session sess)
                                    throws java.lang.Exception

  Read all records from the result set, starting from the specified value object.

  Parameters:
    `valueObjectClass` - value object type
    `filteredColumns` - filtering conditions
    `currentSortedColumns` - sorting conditions (attribute names)
    `currentSortedVersusColumns` - sorting conditions (order versus)
    `fetchMode` - FetchMode object, used to specificy how to retrieve inner objects; e.g. FetchMode.INNER
    `sess` - Session
  Throws:
    `java.lang.Exception`

### getAllFromCriteria

    public static Response getAllFromCriteria(java.util.Map filteredColumns,
                                              java.util.ArrayList currentSortedColumns,
                                              java.util.ArrayList currentSortedVersusColumns,
                                              org.hibernate.Criteria criteria,
                                              org.hibernate.Session sess)
                                       throws java.lang.Exception

  Read all records from the result set, starting from the specified Criteria.

  Parameters:
    `filteredColumns` - filtering conditions
    `currentSortedColumns` - sorting conditions (attribute names)
    `currentSortedVersusColumns` - sorting conditions (order versus)
    `sess` - Session
  Throws:
    `java.lang.Exception`

Overview | Package | Class | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD