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

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

public class HsqlDBListDatabaseUtils
extends ListDatabaseUtils

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

Version:
$Id: HsqlDBListDatabaseUtils.java,v 1.13 2007/01/07 06:14:23 bastafidli Exp $
Author:
Julo Legeny
Code reviewer:
Miro Halas
Code reviewed:
1.10 2006/03/13 16:50:25 bastafidli

Field Summary
 
Fields inherited from class org.opensubsystems.patterns.listdata.persist.db.ListDatabaseUtils
LIST_INDEX_PREFIX
 
Constructor Summary
HsqlDBListDatabaseUtils()
          Constructor
 
Method Summary
protected  int getTotalRecords(java.sql.ResultSet rsQueryResults, ListOptions options)
          Method for getting number of total records in result set using getRow() method.
protected  java.lang.String preprocessSelectQueryForCreationDate(java.lang.String inputQuery, ListOptions options, ListDatabaseSchema schema)
          Method that preprocess query (by adding specific SQL clauses after CREATION_DATE sort column) to fix ordering if DBS supports short timestamp value.
 
Methods inherited from class org.opensubsystems.patterns.listdata.persist.db.ListDatabaseUtils
allocateObjectList, convertValueToSQL, getConstructListIndexName, getInstance, getObjectList, getObjectListKeepSelected, getSelectCount, getSelectList, getSQLOperation, getSQLValue, getWhereClause, getWhereClause, parseCondition, preprocessSelectQuery, setOptionPositioning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HsqlDBListDatabaseUtils

public HsqlDBListDatabaseUtils()
Constructor

Method Detail

getTotalRecords

protected int getTotalRecords(java.sql.ResultSet rsQueryResults,
                              ListOptions options)
                       throws org.opensubsystems.core.error.OSSException,
                              java.sql.SQLException
Method for getting number of total records in result set using getRow() method. There can be owerwritten this method by DB specific parts.

Overrides:
getTotalRecords in class ListDatabaseUtils
Parameters:
rsQueryResults - - result set
options - - list options
Returns:
int - number of records in resultset
Throws:
org.opensubsystems.core.error.OSSException - - an error has occured
java.sql.SQLException - - error while executing query

preprocessSelectQueryForCreationDate

protected java.lang.String preprocessSelectQueryForCreationDate(java.lang.String inputQuery,
                                                                ListOptions options,
                                                                ListDatabaseSchema schema)
                                                         throws org.opensubsystems.core.error.OSSException
Method that preprocess query (by adding specific SQL clauses after CREATION_DATE sort column) to fix ordering if DBS supports short timestamp value. This method can be overwritten by DB specific method.

Overrides:
preprocessSelectQueryForCreationDate 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.