GigaSpaces XAP 9.7.2 API

org.openspaces.persistency.hibernate
Class CriteriaHibernateSpaceDataSource

java.lang.Object
  extended by com.gigaspaces.datasource.SpaceDataSource
      extended by org.openspaces.persistency.patterns.ManagedEntriesSpaceDataSource
          extended by org.openspaces.persistency.hibernate.AbstractHibernateSpaceDataSource
              extended by org.openspaces.persistency.hibernate.DefaultHibernateSpaceDataSource
                  extended by org.openspaces.persistency.hibernate.CriteriaHibernateSpaceDataSource

public class CriteriaHibernateSpaceDataSource
extends DefaultHibernateSpaceDataSource

An extension over the default implementation that its main use is to override Hibernate bugs when executing queries with composite objects.

Since:
9.5
Author:
eitany

Field Summary
 
Fields inherited from class org.openspaces.persistency.hibernate.AbstractHibernateSpaceDataSource
logger
 
Constructor Summary
CriteriaHibernateSpaceDataSource(org.hibernate.SessionFactory sessionFactory, Set<String> managedEntries, int fetchSize, boolean performOrderById, String[] initialLoadEntries, int initialLoadThreadPoolSize, int initialLoadChunkSize, boolean useScrollableResultSet)
           
 
Method Summary
 Object getById(DataSourceIdQuery idQuery)
          This method is invoked whenever the space needs to read an entry from the data source according to its Id.
 DataIterator<Object> getDataIterator(DataSourceQuery query)
          Returns a DefaultListQueryDataIterator for the given sql query.
 
Methods inherited from class org.openspaces.persistency.hibernate.DefaultHibernateSpaceDataSource
initialDataLoad
 
Methods inherited from class org.openspaces.persistency.hibernate.AbstractHibernateSpaceDataSource
createInitialLoadIterator, getFetchSize, getInitialLoadChunkSize, getInitialLoadEntries, getManagedEntries, getSessionFactory, isManagedEntry, isPerformOrderById, isUseScrollableResultSet, supportsInheritance
 
Methods inherited from class com.gigaspaces.datasource.SpaceDataSource
getDataIteratorByIds, initialMetadataLoad
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CriteriaHibernateSpaceDataSource

public CriteriaHibernateSpaceDataSource(org.hibernate.SessionFactory sessionFactory,
                                        Set<String> managedEntries,
                                        int fetchSize,
                                        boolean performOrderById,
                                        String[] initialLoadEntries,
                                        int initialLoadThreadPoolSize,
                                        int initialLoadChunkSize,
                                        boolean useScrollableResultSet)
Method Detail

getDataIterator

public DataIterator<Object> getDataIterator(DataSourceQuery query)
Description copied from class: DefaultHibernateSpaceDataSource
Returns a DefaultListQueryDataIterator for the given sql query.

Overrides:
getDataIterator in class DefaultHibernateSpaceDataSource
Parameters:
query - The DataSourceQuery to get results for.
Returns:
A DataIterator instance contains results for the provided DataSourceQuery.

getById

public Object getById(DataSourceIdQuery idQuery)
Description copied from class: SpaceDataSource
This method is invoked whenever the space needs to read an entry from the data source according to its Id.

The returned value can be either a POJO or a SpaceDocument instance.

The default implementation of this method is delegated to the SpaceDataSource.getDataIterator(DataSourceQuery) method so if the data source does not have an optimized way of reading an entity by its Id - the default implementation may suffice.

Overrides:
getById in class SpaceDataSource
Parameters:
idQuery - The DataSourceIdQuery to get a result for.
Returns:
A result from the SpaceDataSource which matches the provided DataSourceIdQuery.

GigaSpaces XAP 9.7.2 API

Copyright © GigaSpaces.