org.openspaces.persistency.hibernate
Class CriteriaHibernateExternalDataSource
java.lang.Object
org.openspaces.persistency.hibernate.AbstractHibernateExternalDataSource
org.openspaces.persistency.hibernate.DefaultHibernateExternalDataSource
org.openspaces.persistency.hibernate.CriteriaHibernateExternalDataSource
- All Implemented Interfaces:
- BulkDataPersister, DataProvider, ManagedDataSource, SQLDataProvider, ManagedDataSourceEntriesProvider
public class CriteriaHibernateExternalDataSource
- extends DefaultHibernateExternalDataSource
- implements DataProvider
An extension over the default implemenation that also implements DataProvider
(not needed by default). The class main use is to override Hibernate bugs whene executing queries with composite
objects.
- Author:
- kimchy
Methods inherited from class org.openspaces.persistency.hibernate.AbstractHibernateExternalDataSource |
createInitialLoadIterator, getFetchSize, getInitialLoadChunkSize, getInitialLoadEntries, getManagedEntries, getSessionFactory, init, isManagedEntry, isPerformOrderById, isUseScrollableResultSet, setFetchSize, setInitialLoadChunkSize, setInitialLoadEntries, setInitialLoadThreadPoolSize, setManagedEntries, setPerformOrderById, setSessionFactory, setUseScrollableResultSet, shutdown |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CriteriaHibernateExternalDataSource
public CriteriaHibernateExternalDataSource()
read
public Object read(Object template)
throws DataSourceException
- Description copied from interface:
DataProvider
- Read one object that matches the given template.
Used by the space for read templates with UID.
- Specified by:
read
in interface DataProvider
- Returns:
- matched object or null
- Throws:
DataSourceException
iterator
public DataIterator iterator(Object template)
throws DataSourceException
- Description copied from interface:
DataProvider
- Create an iterator over all objects that match the given template.
Note: null value can be passed - in case of a null template or at initial space load.
If SQLDataProvider
interface is also implemented - the space will use SQLDataProvider
.iterator instead.
- Specified by:
iterator
in interface DataProvider
- Returns:
- a
DataIterator
or null if no data was found that match the given template
- Throws:
DataSourceException
getId
protected Object getId(Object template)
- Return pojo identifier
getMetadata
protected org.hibernate.metadata.ClassMetadata getMetadata(Object entry)
- Return pojo entry metadata
Copyright © GigaSpaces.