1 21 22 package org.opensubsystems.patterns.listdata.persist.db; 23 24 import java.sql.ResultSet ; 25 import java.sql.SQLException ; 26 27 import org.opensubsystems.core.error.OSSException; 28 import org.opensubsystems.patterns.listdata.data.ListOptions; 29 30 39 public class HsqlDBListDatabaseUtils extends ListDatabaseUtils 40 { 41 43 46 public HsqlDBListDatabaseUtils() 47 { 48 super(); 49 } 50 51 53 56 protected int getTotalRecords( 57 ResultSet rsQueryResults, 58 ListOptions options 59 ) throws OSSException, 60 SQLException 61 { 62 int iOutputCount = 0; 63 64 if (rsQueryResults.last()) 69 { 70 iOutputCount = rsQueryResults.getRow(); 73 75 if (iOutputCount == 1) 79 { 80 rsQueryResults.absolute(iOutputCount); 82 84 boolean bNullRow = true; 85 int iHelp; 86 int iRetrievedColumns = options.getRetrieveColumnCodes().length; 87 88 for (iHelp = 1; bNullRow && (iHelp <= iRetrievedColumns); iHelp++) 89 { 90 bNullRow = (rsQueryResults.getObject(iHelp) == null); 91 } 92 if (bNullRow) 93 { 94 iOutputCount = 0; 95 } 96 } 97 } 98 else 99 { 100 } 102 103 return iOutputCount; 104 } 105 106 109 protected String preprocessSelectQueryForCreationDate( 110 String inputQuery, 111 ListOptions options, 112 ListDatabaseSchema schema 113 ) throws OSSException 114 { 115 return ListQueryPreprocessor.preprocessSelectQueryForCreationDate( 116 inputQuery, options, schema); 117 } 118 } 119 | Popular Tags |