Class DefaultCalendarRepository
- java.lang.Object
-
- org.silverpeas.core.persistence.datasource.repository.jpa.AbstractJpaEntityRepository<E>
-
- org.silverpeas.core.persistence.datasource.repository.jpa.SilverpeasJpaEntityRepository<Calendar>
-
- org.silverpeas.core.calendar.repository.DefaultCalendarRepository
-
- All Implemented Interfaces:
CalendarRepository
,EntityRepository<Calendar>
@Singleton @Repository public class DefaultCalendarRepository extends SilverpeasJpaEntityRepository<Calendar> implements CalendarRepository
- Author:
- Yohann Chastagnier
-
-
Constructor Summary
Constructors Constructor Description DefaultCalendarRepository()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
delete(List<Calendar> calendars)
Deletes entities.long
deleteByComponentInstanceId(String componentInstanceId)
Deletes all entities belonging to the specified component instance.long
deleteById(Collection<String> calendarIds)
Deletes entities by their ids.List<Calendar>
getAllSynchronized()
Gets all the calendars in Silverpeas synchronized with an external one.List<Calendar>
getByComponentInstanceId(String componentInstanceId)
Gets the calendars represented by the specified component instance.List<Calendar>
getByComponentInstanceIds(Collection<String> componentInstanceIds)
Gets the calendars represented by the specified component instances.-
Methods inherited from class org.silverpeas.core.persistence.datasource.repository.jpa.AbstractJpaEntityRepository
contains, countByCriteria, countFromJpqlString, 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
contains, delete, deleteById, findByCriteria, flush, getAll, getById, getById, getById, save, save, save
-
-
-
-
Method Detail
-
getByComponentInstanceId
public List<Calendar> getByComponentInstanceId(String componentInstanceId)
Description copied from interface:CalendarRepository
Gets the calendars represented by the specified component instance.- Specified by:
getByComponentInstanceId
in interfaceCalendarRepository
- Parameters:
componentInstanceId
- the unique identifier identifying an instance of a Silverpeas component. For instance, the component can be a collaborative application or a personal one.- Returns:
- a list containing the calendar instances which matched if any, empty list otherwise.
-
getByComponentInstanceIds
public List<Calendar> getByComponentInstanceIds(Collection<String> componentInstanceIds)
Description copied from interface:CalendarRepository
Gets the calendars represented by the specified component instances.- Specified by:
getByComponentInstanceIds
in interfaceCalendarRepository
- Parameters:
componentInstanceIds
- the unique identifiers identifying instances of a Silverpeas component. For instance, a component can be a collaborative application or a personal one.- Returns:
- a list containing the calendar instances which matched if any, empty list otherwise.
-
getAllSynchronized
public List<Calendar> getAllSynchronized()
Description copied from interface:CalendarRepository
Gets all the calendars in Silverpeas synchronized with an external one.- Specified by:
getAllSynchronized
in interfaceCalendarRepository
- Returns:
- a list of synchronized calendars.
-
delete
public void delete(List<Calendar> calendars)
Description copied from interface:EntityRepository
Deletes entities.- Specified by:
delete
in interfaceEntityRepository<Calendar>
- Overrides:
delete
in classAbstractJpaEntityRepository<Calendar>
- Parameters:
calendars
- the entities to delete.
-
deleteById
public long deleteById(Collection<String> calendarIds)
Description copied from interface:EntityRepository
Deletes entities by their ids.- Specified by:
deleteById
in interfaceEntityRepository<Calendar>
- Overrides:
deleteById
in classAbstractJpaEntityRepository<Calendar>
- Parameters:
calendarIds
- the identifiers of the entities to delete.- Returns:
- number of deleted entities.
-
deleteByComponentInstanceId
public long deleteByComponentInstanceId(String componentInstanceId)
Description copied from class:SilverpeasJpaEntityRepository
Deletes all entities belonging to the specified component instance.- Specified by:
deleteByComponentInstanceId
in interfaceEntityRepository<Calendar>
- Overrides:
deleteByComponentInstanceId
in classSilverpeasJpaEntityRepository<Calendar>
- Parameters:
componentInstanceId
- the unique instance identifier.- Returns:
- the number of deleted entities.
-
-