Cumulus4j API
(1.2.0-SNAPSHOT)

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(CryptoContext cryptoContext, PersistenceManager pmData, Class<?> candidateCls, boolean subclasses)
          Access the data entry ids for a candidate.
static List<Object> getAllPersistentObjectsForCandidateClasses(CryptoContext cryptoContext, PersistenceManager pmData, 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(CryptoContext cryptoContext,
                                                       PersistenceManager pmData,
                                                       Class<?> candidateCls,
                                                       boolean subclasses)
Access the data entry ids for a candidate.

Parameters:
cryptoContext - the crypto-context (containing the ExecutionContext and other context data + API).
pmData - PersistenceManager for the backend data
candidateCls - Candidate class
subclasses - Whether to include subclasses
Returns:
The data entry ids

getAllPersistentObjectsForCandidateClasses

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

Parameters:
cryptoContext - the crypto-context (containing the ExecutionContext and other context data + API).
pmData - PersistenceManager for the backend data
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.2.0-SNAPSHOT)

Copyright © 2013 NightLabs Consulting GmbH. All Rights Reserved.