org.deegree.metadata.persistence
Interface MetadataStore<T extends MetadataRecord>

All Superinterfaces:
Resource
All Known Implementing Classes:
EbrimEOMDStore, ISOMetadataStore

public interface MetadataStore<T extends MetadataRecord>
extends Resource

Base interface of the MetadataRecord persistence layer, provides access to stored MetadataRecord instances.

Version:
$Revision: 30912 $, $Date: 2011-05-25 08:59:06 +0200 (Mi, 25. Mai 2011) $
Author:
Steffen Thomas, Markus Schneider, last edited by: $Author: lbuesching $

Method Summary
 MetadataStoreTransaction acquireTransaction()
          Acquires transactional access to this MetadataStore.
 String getConnId()
          Returns the JDBC connection id.
 MetadataResultSet<T> getRecordById(List<String> idList, QName[] recordTypeNames)
          Looks up the given MetadataRecord identifiers and provides access to matching MetadataRecords.
 int getRecordCount(MetadataQuery query)
          Returns the number of MetadataRecords that match the given MetadataQuery.
 MetadataResultSet<T> getRecords(MetadataQuery query)
          Performs the given MetadataQuery and provides access to the MetadataRecords that match it.
 String getType()
           
 
Methods inherited from interface org.deegree.commons.config.Resource
destroy, init
 

Method Detail

getRecords

MetadataResultSet<T> getRecords(MetadataQuery query)
                                                       throws MetadataStoreException
Performs the given MetadataQuery and provides access to the MetadataRecords that match it.

NOTE: A caller must ensure to call MetadataResultSet.close() after working with the result set. Otherwise, DB resources may be left open.

Parameters:
query - query that selects the records, must not be null
Returns:
result set for accessing the matching records, never null
Throws:
MetadataStoreException

getRecordCount

int getRecordCount(MetadataQuery query)
                   throws MetadataStoreException
Returns the number of MetadataRecords that match the given MetadataQuery.

Parameters:
query - query that selects the records, must not be null
Returns:
number of matching records
Throws:
MetadataStoreException

getRecordById

MetadataResultSet<T> getRecordById(List<String> idList,
                                   QName[] recordTypeNames)
                                                          throws MetadataStoreException
Looks up the given MetadataRecord identifiers and provides access to matching MetadataRecords.

NOTE: A caller must ensure to call MetadataResultSet.close() after working with the result set. Otherwise, DB resources may be left open.

Parameters:
idList - list of the requested record identifiers, can be empty, but must not be null
recordTypeNames - requested record type names, can be empty or null
Throws:
MetadataStoreException

acquireTransaction

MetadataStoreTransaction acquireTransaction()
                                            throws MetadataStoreException
Acquires transactional access to this MetadataStore.

Returns:
transaction object that allows to perform transaction operations on this store, never null
Throws:
MetadataStoreException - if the transactional access could not be acquired or is not available for this implementation

getConnId

String getConnId()
Returns the JDBC connection id.

Returns:
the JDBC connection id, never null

getType

String getType()
Returns:
the type of the store


Copyright © 2011. All Rights Reserved.