Package org.silverpeas.components.resourcesmanager.repository

## Class ResourceJpaRepository

- java.lang.Object
- - org.silverpeas.core.persistence.datasource.repository.jpa.AbstractJpaEntityRepository<E>
  - - org.silverpeas.core.persistence.datasource.repository.jpa.BasicJpaEntityRepository<Resource>
    - - org.silverpeas.components.resourcesmanager.repository.ResourceJpaRepository

- All Implemented Interfaces:
    `ResourceRepository`, `org.silverpeas.core.persistence.datasource.repository.EntityRepository<Resource>`, `org.silverpeas.core.persistence.datasource.repository.WithSaveAndFlush<Resource>`

      @Repository
      public class ResourceJpaRepository
      extends org.silverpeas.core.persistence.datasource.repository.jpa.BasicJpaEntityRepository<Resource>
      implements ResourceRepository

  Author:
    ebonnet

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ResourceJpaRepository()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `deleteResourcesFromCategory​(Long categoryId)` |
    `List<Resource>` | `findAllBookableResources​(String instanceId)` |
    `List<Resource>` | `findAllReservedResources​(Long reservationIdToSkip, List<Long> aimedResourceIds, String startPeriod, String endPeriod)` |
    `List<Resource>` | `findAllResources​(String instanceId)` |
    `List<Resource>` | `findAllResourcesByCategory​(Long categoryId)` |
    `List<Resource>` | `findAllResourcesForReservation​(Long reservationId)` |

    - ### Methods inherited from class org.silverpeas.core.persistence.datasource.repository.jpa.BasicJpaEntityRepository

      `deleteByComponentInstanceId, saveAndFlush`

    - ### 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

      `contains, delete, delete, deleteByComponentInstanceId, deleteById, deleteById, findByCriteria, flush, getAll, getById, getById, getById, save, save, save`

    - ### Methods inherited from interface org.silverpeas.core.persistence.datasource.repository.WithSaveAndFlush

      `saveAndFlush`

- - ### Constructor Detail

    - #### ResourceJpaRepository

          public ResourceJpaRepository()

  - ### Method Detail

    - #### findAllResourcesByCategory

          public List<Resource> findAllResourcesByCategory​(Long categoryId)

      Specified by:
        `findAllResourcesByCategory` in interface `ResourceRepository`

    - #### findAllBookableResources

          public List<Resource> findAllBookableResources​(String instanceId)

      Specified by:
        `findAllBookableResources` in interface `ResourceRepository`

    - #### findAllResources

          public List<Resource> findAllResources​(String instanceId)

      Specified by:
        `findAllResources` in interface `ResourceRepository`

    - #### findAllResourcesForReservation

          public List<Resource> findAllResourcesForReservation​(Long reservationId)

      Specified by:
        `findAllResourcesForReservation` in interface `ResourceRepository`

    - #### findAllReservedResources

          public List<Resource> findAllReservedResources​(Long reservationIdToSkip,
                                                         List<Long> aimedResourceIds,
                                                         String startPeriod,
                                                         String endPeriod)

      Specified by:
        `findAllReservedResources` in interface `ResourceRepository`

    - #### deleteResourcesFromCategory

          public void deleteResourcesFromCategory​(Long categoryId)

      Specified by:
        `deleteResourcesFromCategory` in interface `ResourceRepository`