Cumulus4j API
(1.0.1)

org.cumulus4j.store.query
Class QueryHelper

java.lang.Object
  extended by org.cumulus4j.store.query.QueryHelper

public class QueryHelper
extends Object

Helper methods for querying.


Constructor Summary
QueryHelper()
           
 
Method Summary
static Set<Long> getAllDataEntryIdsForCandidate(PersistenceManager pmData, ExecutionContext ec, Class candidateCls, boolean subclasses)
          Access the data entry ids for a candidate.
static List<Object> getAllPersistentObjectsForCandidateClasses(PersistenceManager pmData, ExecutionContext ec, Set<ClassMeta> candidateClassMetas)
          Convenience method to return the persistent objects for the classes with the provided ClassMetas.
static Set<ClassMeta> getCandidateClassMetas(Cumulus4jStoreManager storeMgr, ExecutionContext ec, Class<?> candidateClass, boolean withSubclasses)
          Convenience method to return the ClassMeta objects for the specified class (and subclasses if required).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryHelper

public QueryHelper()
Method Detail

getAllDataEntryIdsForCandidate

public static Set<Long> getAllDataEntryIdsForCandidate(PersistenceManager pmData,
                                                       ExecutionContext ec,
                                                       Class candidateCls,
                                                       boolean subclasses)
Access the data entry ids for a candidate.

Parameters:
pmData - PersistenceManager for the backend data
ec - ExecutionContext
candidateCls - Candidate class
subclasses - Whether to include subclasses
Returns:
The data entry ids

getAllPersistentObjectsForCandidateClasses

public static List<Object> getAllPersistentObjectsForCandidateClasses(PersistenceManager pmData,
                                                                      ExecutionContext ec,
                                                                      Set<ClassMeta> candidateClassMetas)
Convenience method to return the persistent objects for the classes with the provided ClassMetas.

Parameters:
pmData - PersistenceManager for the backend data
ec - ExecutionContext
candidateClassMetas - The class metas defining the required classes
Returns:
The persistent objects

getCandidateClassMetas

public static Set<ClassMeta> getCandidateClassMetas(Cumulus4jStoreManager storeMgr,
                                                    ExecutionContext ec,
                                                    Class<?> candidateClass,
                                                    boolean withSubclasses)
Convenience method to return the ClassMeta objects for the specified class (and subclasses if required).

Parameters:
storeMgr - Cumulus4J StoreManager
ec - ExecutionContext
candidateClass - The class required
withSubclasses - Whether to return subclasses too
Returns:
The ClassMeta objects

Cumulus4j API
(1.0.1)

Copyright © 2012 NightLabs Consulting GmbH. All Rights Reserved.