p3j.database.hibernate
Class ProjectionResultsIterator

java.lang.Object
  extended by p3j.database.hibernate.ProjectionResultsIterator
All Implemented Interfaces:
Iterable<ResultsOfTrial>, Iterator<ResultsOfTrial>, IProjectionResultsIterator

public class ProjectionResultsIterator
extends Object
implements IProjectionResultsIterator

HIbernate implementation of a results iterator.

Author:
Christina Bohk, Roland Ewald

Constructor Summary
ProjectionResultsIterator(org.hibernate.SessionFactory sessionFactory, int projectionID)
          Instantiates a new projection results iterator.
 
Method Summary
 void clearFromCache(ResultsOfTrial resultsOfTrial)
          Clears result from cache.
 ResultsOfTrial getNextResult()
          Gets the next result.
 boolean hasNext()
           
 Iterator<ResultsOfTrial> iterator()
           
 ResultsOfTrial next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProjectionResultsIterator

public ProjectionResultsIterator(org.hibernate.SessionFactory sessionFactory,
                                 int projectionID)
Instantiates a new projection results iterator.

Parameters:
sessionFactory - the session factory
projectionID - the projection ID
Method Detail

getNextResult

public ResultsOfTrial getNextResult()
Description copied from interface: IProjectionResultsIterator
Gets the next result.

Specified by:
getNextResult in interface IProjectionResultsIterator
Returns:
the next result, null if none is available anymore

clearFromCache

public void clearFromCache(ResultsOfTrial resultsOfTrial)
Clears result from cache.

Parameters:
resultsOfTrial - the trial results to be cleared from the cache

iterator

public Iterator<ResultsOfTrial> iterator()
Specified by:
iterator in interface Iterable<ResultsOfTrial>

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator<ResultsOfTrial>

next

public ResultsOfTrial next()
Specified by:
next in interface Iterator<ResultsOfTrial>

remove

public void remove()
Specified by:
remove in interface Iterator<ResultsOfTrial>


Copyright © 2012. All Rights Reserved.