org.openspaces.persistency.hibernate
Class CriteriaHibernateSpaceDataSource
java.lang.Object
com.gigaspaces.datasource.SpaceDataSource
org.openspaces.persistency.patterns.ManagedEntriesSpaceDataSource
org.openspaces.persistency.hibernate.AbstractHibernateSpaceDataSource
org.openspaces.persistency.hibernate.DefaultHibernateSpaceDataSource
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
Constructor Summary |
CriteriaHibernateSpaceDataSource(org.hibernate.SessionFactory sessionFactory,
Set<String> managedEntries,
int fetchSize,
boolean performOrderById,
String[] initialLoadEntries,
int initialLoadThreadPoolSize,
int initialLoadChunkSize,
boolean useScrollableResultSet)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CriteriaHibernateSpaceDataSource
public CriteriaHibernateSpaceDataSource(org.hibernate.SessionFactory sessionFactory,
Set<String> managedEntries,
int fetchSize,
boolean performOrderById,
String[] initialLoadEntries,
int initialLoadThreadPoolSize,
int initialLoadChunkSize,
boolean useScrollableResultSet)
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
.
Copyright © GigaSpaces.