Class BasicJpaEntityRepository<E extends BasicJpaEntity<E,?>>
- java.lang.Object
-
- org.silverpeas.core.persistence.datasource.repository.jpa.AbstractJpaEntityRepository<E>
-
- org.silverpeas.core.persistence.datasource.repository.jpa.BasicJpaEntityRepository<E>
-
- Type Parameters:
E
- specify the class name of the entity which is handled by the repository entity.
- All Implemented Interfaces:
EntityRepository<E>
,WithSaveAndFlush<E>
- Direct Known Subclasses:
ContributionTrackingRepository
,DefaultCalendarEventOccurrenceRepository
,DefaultCalendarEventRepository
,DefaultReminderRepository
,DelayedNotificationDataJpaRepository
,DelayedNotificationUserSettingJpaRepository
,DocumentPermalinkJpaRepository
,DownloadDetailJpaRepository
,ErrorRepository
,ExternalAccountJpaRepository
,HistoryStepRepository
,NotificationResourceDataJpaRepository
,PdcAxisValueRepository
,PdcClassificationRepository
,PersistentResourceTokenJPARepository
,PersonalizationJPARepository
,POPUPMessageBeanRepository
,ProcessInstanceRepository
,QuotaJPARepository
,RatingRepository
,ServerMessageBeanRepository
,SILVERMAILMessageBeanRepository
,SPGroupJpaRepository
,SPUserJpaRepository
,TicketJpaRepository
,UserSettingsRepository
,VersionPermalinkJpaRepository
public class BasicJpaEntityRepository<E extends BasicJpaEntity<E,?>> extends AbstractJpaEntityRepository<E> implements WithSaveAndFlush<E>
It represents the repositories taken in charge the persistence of the business entities in Silverpeas in a basic way, that is to say without any of the added features from the new Silverpeas persistence mechanism (creation and update date, ...). Theses entities were already yet here before the new Silverpeas Persistence API, and they were managed according to the SQL old school way (J2EE BMP way). The repository is here to manage such entities in order to facilitate the migration from the BMP approach to the new JPA one.The managed entities can be a contribution, a contribution's content or a transverse application bean (user, domain, ...) whose the persistence was managed in the old SQL way.
This interface is dedicated to be implemented by abstract repositories that providing each an implementation of the persistence technology used to manage the persistence of the entities in a data source.
- Author:
- ebonnet
-
-
Constructor Summary
Constructors Constructor Description BasicJpaEntityRepository()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
deleteByComponentInstanceId(String instanceId)
Deletes all entities belonging to the specified component instance.E
saveAndFlush(E entity)
Saves the specified entity and then flushes the persistence context into the underlying data sources.-
Methods inherited from class org.silverpeas.core.persistence.datasource.repository.jpa.AbstractJpaEntityRepository
contains, countByCriteria, countFromJpqlString, delete, deleteById, deleteFromJpqlQuery, deleteFromNamedQuery, findByCriteria, findByNamedQuery, findFirstByNamedQuery, flush, getAll, getById, getById, getEntityClass, getEntityManager, getFromJpqlString, getFromJpqlString, getFromNamedQuery, getFromNamedQuery, getIdentifierConverter, getMaximumItemsInClause, listFromJpqlString, listFromJpqlString, listFromJpqlString, listFromJpqlString, listFromNamedQuery, listFromNamedQuery, newNamedParameters, noParameter, save, setMaximumItemsInClause, split, streamByNamedQuery, streamByNamedQuery, streamFromJpqlString, streamFromJpqlString, updateFromJpqlQuery, updateFromNamedQuery
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.silverpeas.core.persistence.datasource.repository.EntityRepository
delete, deleteById, getById, save, save
-
-
-
-
Method Detail
-
saveAndFlush
public E saveAndFlush(E entity)
Description copied from interface:WithSaveAndFlush
Saves the specified entity and then flushes the persistence context into the underlying data sources.- Specified by:
saveAndFlush
in interfaceWithSaveAndFlush<E extends BasicJpaEntity<E,?>>
- Parameters:
entity
- the entity to save.- Returns:
- the saved entity.
-
deleteByComponentInstanceId
public long deleteByComponentInstanceId(String instanceId)
Description copied from interface:EntityRepository
Deletes all entities belonging to the specified component instance.- Specified by:
deleteByComponentInstanceId
in interfaceEntityRepository<E extends BasicJpaEntity<E,?>>
- Parameters:
instanceId
- the unique component instance identifier.- Returns:
- the number of deleted entities.
-
-