org.deegree.metadata.persistence
Class MetadataQuery

java.lang.Object
  extended by org.deegree.metadata.persistence.MetadataQuery

public class MetadataQuery
extends Object

A query to be performed against a MetadataStore.

Version:
$Revision: 30656 $, $Date: 2011-05-05 13:43:01 +0200 (Do, 05. Mai 2011) $
Author:
Steffen Thomas, Markus Schneider, Lyn Goltz, last edited by: $Author: mschneider $

Constructor Summary
MetadataQuery(QName[] queryTypeNames, QName[] returnTypeNames, Filter filter, SortProperty[] sortCriteria, int startPosition, int maxRecords)
          Creates a new MetadataQuery instance.
 
Method Summary
 Filter getFilter()
          Returns the constraints to be applied on the queried records.
 int getMaxRecords()
          Returns the maximum number of records to include in the result.
 QName[] getQueryTypeNames()
          Returns the queried record types.
 QName[] getReturnTypeNames()
          Returns the record types that should be returned.
 SortProperty[] getSorting()
          Returns the constraints to be applied on the queried records.
 int getStartPosition()
          Returns the number of the first hit to be included in the result.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetadataQuery

public MetadataQuery(QName[] queryTypeNames,
                     QName[] returnTypeNames,
                     Filter filter,
                     SortProperty[] sortCriteria,
                     int startPosition,
                     int maxRecords)
Creates a new MetadataQuery instance.

Parameters:
queryTypeNames - names of record types on which the query will be performed, can be null (depending on the metadata profile)
returnTypeNames - names of record types to be returned, can be null (depending on the metadata profile)
filter - constraint on the queried records, can be null
sortCriteria - sort criteria, can be null
startPosition - number of the first hit to be included in the result, starting at one
maxRecords - maximum number of hits to include in the results or -1 (unrestricted)
Method Detail

getQueryTypeNames

public QName[] getQueryTypeNames()
Returns the queried record types.

Depending on the concrete metadata profile, multiple type names are allowed and may define aliases (e.g eBRIM).

Returns:
queried record types, never null

getReturnTypeNames

public QName[] getReturnTypeNames()
Returns the record types that should be returned.

This only makes sense for metadata profiles that support join queries on multiple record types.

Returns:
record types to be returned, never null

getFilter

public Filter getFilter()
Returns the constraints to be applied on the queried records.

Returns:
filter constraints, can be null (no constraints)

getSorting

public SortProperty[] getSorting()
Returns the constraints to be applied on the queried records.

Returns:
filter constraints, can be null (no constraints)

getStartPosition

public int getStartPosition()
Returns the number of the first hit to be included in the result.

Returns:
number of the first hit to be included, starting at one

getMaxRecords

public int getMaxRecords()
Returns the maximum number of records to include in the result.

Returns:
maximum number of records or -1 (unrestricted)


Copyright © 2011. All Rights Reserved.