org.deegree.metadata.persistence
Class XMLMetadataResultSet<T extends MetadataRecord>

java.lang.Object
  extended by org.deegree.metadata.persistence.XMLMetadataResultSet<T>
All Implemented Interfaces:
MetadataResultSet<T>

public abstract class XMLMetadataResultSet<T extends MetadataRecord>
extends Object
implements MetadataResultSet<T>

abstract base class for MetadataResultSets. The reults set must contain the XML representation of the metadata record as binary at the first position!

Version:
$Revision: $, $Date: $
Author:
Lyn Goltz, last edited by: $Author: lyn $

Constructor Summary
XMLMetadataResultSet(ResultSet rs, Connection conn, PreparedStatement stmt)
           
 
Method Summary
 void close()
          Must be invoked after using to close underlying resources, e.g.
 T getRecord()
          Returns the MetadataRecord at the current cursor position.
protected abstract  T getRecord(XMLStreamReader xmlReader)
           
 int getRemaining()
           
 boolean next()
          Moves the cursor down one row from its current position.
 void skip(int rows)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLMetadataResultSet

public XMLMetadataResultSet(ResultSet rs,
                            Connection conn,
                            PreparedStatement stmt)
Method Detail

close

public void close()
           throws MetadataStoreException
Description copied from interface: MetadataResultSet
Must be invoked after using to close underlying resources, e.g. SQL ResultSets.

Specified by:
close in interface MetadataResultSet<T extends MetadataRecord>
Throws:
MetadataStoreException

getRecord

public T getRecord()
                                   throws MetadataStoreException
Description copied from interface: MetadataResultSet
Returns the MetadataRecord at the current cursor position.

Specified by:
getRecord in interface MetadataResultSet<T extends MetadataRecord>
Returns:
record at the current position, never null
Throws:
MetadataStoreException

skip

public void skip(int rows)
          throws MetadataStoreException
Specified by:
skip in interface MetadataResultSet<T extends MetadataRecord>
Throws:
MetadataStoreException

getRemaining

public int getRemaining()
                 throws MetadataStoreException
Specified by:
getRemaining in interface MetadataResultSet<T extends MetadataRecord>
Returns:
Throws:
MetadataStoreException

next

public boolean next()
             throws MetadataStoreException
Description copied from interface: MetadataResultSet
Moves the cursor down one row from its current position. A ResultSet cursor is initially positioned before the first row; the first call to the method next makes the first row the current row; the second call makes the second row the current row, and so on.

Specified by:
next in interface MetadataResultSet<T extends MetadataRecord>
Returns:
true, if the cursor was moved down one row, false otherwise (no rows left)
Throws:
MetadataStoreException

getRecord

protected abstract T getRecord(XMLStreamReader xmlReader)


Copyright © 2011. All Rights Reserved.