/** * Requests all records matching the query. * * @param query * never <code>null</code> * @return all records matching the query, may be empty but never <code>null</code> * @throws FilterEvaluationException */ public MetadataResultSet<ISORecord> getRecords( MetadataQuery query ) throws FilterEvaluationException { if ( query == null ) { throw new IllegalArgumentException( "MetadataQuery must not be null!" ); } List<ISORecord> result = applyFilter( query.getFilter(), query.getStartPosition(), query.getMaxRecords() ); return new ListMetadataResultSet( result ); }
idSelect.append( ", ROW_NUMBER() OVER (ORDER BY X1.ID) as rownum" ); if ( query != null && ( query.getStartPosition() != 1 || query.getMaxRecords() > -1 ) && dialect.getClass().getSimpleName().equals( "OracleDialect" ) ) { String oldHeader = idSelect.toString(); if ( dialect instanceof PostGISDialect && query != null && query.getMaxRecords() > -1 ) { idSelect.append( " LIMIT " ).append( query.getMaxRecords() ); if ( query != null && ( query.getStartPosition() != 1 || query.getMaxRecords() > -1 ) && dialect.getClass().getSimpleName().equals( "OracleDialect" ) ) { idSelect.append( " ) " ); idSelect.append( " a " ); if ( query.getMaxRecords() > -1 ) { int max = query.getMaxRecords() - 1; if ( query.getStartPosition() != -1 ) { max += query.getStartPosition();
idSelect.append( " LIMIT " ).append( query.getMaxRecords() );