DefaultHibernateSpaceDataSource
or DefaultHibernateSpaceSynchronizationEndpoint
instead.@Deprecated public class DefaultHibernateExternalDataSource extends AbstractHibernateExternalDataSource implements BulkDataPersister, SQLDataProvider
Session
.HIBERNATE_CFG_PROPERTY, logger
NUMBER_OF_PARTITIONS, STATIC_PARTITION_NUMBER
Constructor and Description |
---|
DefaultHibernateExternalDataSource()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
executeBulk(List<BulkItem> bulkItems)
Deprecated.
Perform the given bulk changes using Hibernate
Session . |
protected Serializable |
getIdentifier(Object o)
Deprecated.
Extracts and returns the hibernate object identifier
|
DataIterator |
initialLoad()
Deprecated.
Performs the initial load operation.
|
DataIterator |
iterator(SQLQuery sqlQuery)
Deprecated.
Returns a
DefaultListQueryDataIterator for the
given sql query. |
void |
setDeleteById(boolean deleteById)
Deprecated.
If set to
true the object will be deleted using only its id. |
void |
setUseMerge(boolean useMerge)
Deprecated.
If set to
true , will use Hibernate merge to perform the create/update, and will
merge before calling delete. |
createInitialLoadIterator, filterItemValue, getFetchSize, getInitialLoadChunkSize, getInitialLoadEntries, getManagedEntries, getPartialUpdateHQL, getSessionFactory, init, isManaged, isManagedEntry, isPerformOrderById, isUseScrollableResultSet, setFetchSize, setInitialLoadChunkSize, setInitialLoadEntries, setInitialLoadThreadPoolSize, setManagedEntries, setPerformOrderById, setSessionFactory, setUseScrollableResultSet, shutdown
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
init, shutdown
public DefaultHibernateExternalDataSource()
public void setUseMerge(boolean useMerge)
true
, will use Hibernate merge
to perform the create/update, and will
merge before calling delete. This might be required for complex mappings (depends on Hibernate) at the
expense of slower performance. Defaults to false
.public void setDeleteById(boolean deleteById)
true
the object will be deleted using only its id.
If set to false
the object will be deleted using the whole object.
Defaults to true
.deleteById
- public void executeBulk(List<BulkItem> bulkItems) throws DataSourceException
Session
.
Note, this implementation relies on Hibernate NonUniqueObjectException
in case
the entity is already associated with the given session, and in such a case, will result in performing
merge operation (which is more expensive).
executeBulk
in interface BulkDataPersister
bulkItems
- list of data object and the operation to apply on that objectDataSourceException
- when the data store fails to persist the given list of objectspublic DataIterator iterator(SQLQuery sqlQuery) throws DataSourceException
DefaultListQueryDataIterator
for the
given sql query.iterator
in interface SQLDataProvider
DataIterator
or null if no data was found that match the given templateDataSourceException
public DataIterator initialLoad() throws DataSourceException
AbstractHibernateExternalDataSource.setInitialLoadEntries(String[])
initial load
entries. If AbstractHibernateExternalDataSource.getInitialLoadChunkSize()
is set to -1
, will use
DefaultScrollableDataIterator
for each entity. If
AbstractHibernateExternalDataSource.getInitialLoadChunkSize()
is set to a non -1
value, will use the
DefaultChunkScrollableDataIterator
.initialLoad
in interface ManagedDataSource
DataIterator
or null if no data should be loaded into spaceDataSourceException
protected Serializable getIdentifier(Object o)
o
- Copyright © GigaSpaces.