org.opensubsystems.patterns.listdata.persist.db
Class PostgreSQLListDatabaseUtils

java.lang.Object
  extended by org.opensubsystems.patterns.listdata.persist.db.ListDatabaseUtils
      extended by org.opensubsystems.patterns.listdata.persist.db.PostgreSQLListDatabaseUtils

public class PostgreSQLListDatabaseUtils
extends ListDatabaseUtils

This class is used for common list retrieval and manipulation routines specific for PostgreSQL.

Version:
$Id: PostgreSQLListDatabaseUtils.java,v 1.15 2007/01/07 06:14:23 bastafidli Exp $
Author:
Julo Legeny
Code reviewer:
Miro Halas
Code reviewed:
1.12 2006/03/14 23:56:56 jlegeny

Field Summary
 
Fields inherited from class org.opensubsystems.patterns.listdata.persist.db.ListDatabaseUtils
LIST_INDEX_PREFIX
 
Constructor Summary
PostgreSQLListDatabaseUtils()
          Constructor
 
Method Summary
 java.util.List getObjectList(ListOptions options, java.lang.String query, ListDatabaseFactory factory, ListDatabaseSchema schema)
          Get list of data objects for specified parameters
protected  java.lang.String preprocessSelectQuery(java.lang.String inputQuery, ListOptions options, ListDatabaseSchema schema)
          Method that preprocess query (by adding specific SQL clauses for example LIMIT, ...) to improve performance of selecting items from the list at specific position.
 
Methods inherited from class org.opensubsystems.patterns.listdata.persist.db.ListDatabaseUtils
allocateObjectList, convertValueToSQL, getConstructListIndexName, getInstance, getObjectListKeepSelected, getSelectCount, getSelectList, getSQLOperation, getSQLValue, getTotalRecords, getWhereClause, getWhereClause, parseCondition, preprocessSelectQueryForCreationDate, setOptionPositioning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PostgreSQLListDatabaseUtils

public PostgreSQLListDatabaseUtils()
Constructor

Method Detail

getObjectList

public java.util.List getObjectList(ListOptions options,
                                    java.lang.String query,
                                    ListDatabaseFactory factory,
                                    ListDatabaseSchema schema)
                             throws org.opensubsystems.core.error.OSSException
Get list of data objects for specified parameters

Overrides:
getObjectList in class ListDatabaseUtils
Parameters:
options - - list option describing the list to retrieve
query - - select SQL query
factory - - list factory for specific data object
schema - - list database schema
Returns:
List - list of data objects
Throws:
org.opensubsystems.core.error.OSSException - - an error getting object list

preprocessSelectQuery

protected java.lang.String preprocessSelectQuery(java.lang.String inputQuery,
                                                 ListOptions options,
                                                 ListDatabaseSchema schema)
                                          throws org.opensubsystems.core.error.OSSException
Method that preprocess query (by adding specific SQL clauses for example LIMIT, ...) to improve performance of selecting items from the list at specific position. This method can be overwritten by DB specific method.

Overrides:
preprocessSelectQuery in class ListDatabaseUtils
Parameters:
inputQuery - - query that will be preprocessed
options - - initialized list options that will be used for retrieving begin position, page size, ...
schema - - list database schema
Returns:
String - preprocessed query
Throws:
org.opensubsystems.core.error.OSSException - - error during preprocessing select query


Copyright © 2003 - 2006 OpenSubsystems s.r.o.