Package org.silverpeas.components.resourcesmanager.repository

# Class ResourceValidatorJpaRepository

java.lang.Object
org.silverpeas.core.persistence.datasource.repository.jpa.AbstractJpaEntityRepository<E>
org.silverpeas.core.persistence.datasource.repository.jpa.BasicJpaEntityRepository<ResourceValidator>
org.silverpeas.components.resourcesmanager.repository.ResourceValidatorJpaRepository

All Implemented Interfaces:
  `ResourceValidatorRepository`, `org.silverpeas.core.persistence.datasource.repository.EntityRepository<ResourceValidator>`, `org.silverpeas.core.persistence.datasource.repository.WithSaveAndFlush<ResourceValidator>`

@Repository public class ResourceValidatorJpaRepository extends org.silverpeas.core.persistence.datasource.repository.jpa.BasicJpaEntityRepository<ResourceValidator> implements ResourceValidatorRepository

Author:
  ebonnet

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ResourceValidatorJpaRepository()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `long`
  `deleteByComponentInstanceId(String instanceId)`
  Deletes all entities belonging to the specified component instance.
  `ResourceValidator`
  `getResourceValidator(Long currentResourceId, Long currentUserId)`

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

  `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, deleteById, deleteById, findByCriteria, flush, getAll, getById, getById, getById, save, save, save`

- ## Constructor Details

  - ### ResourceValidatorJpaRepository

    public ResourceValidatorJpaRepository()

- ## Method Details

  - ### getResourceValidator

    public ResourceValidator getResourceValidator(Long currentResourceId, Long currentUserId)
    Specified by:
      `getResourceValidator` in interface `ResourceValidatorRepository`

  - ### deleteByComponentInstanceId

    public long deleteByComponentInstanceId(String instanceId)
    Deletes all entities belonging to the specified component instance.
    Specified by:
      `deleteByComponentInstanceId` in interface `org.silverpeas.core.persistence.datasource.repository.EntityRepository<ResourceValidator>`
    Overrides:
      `deleteByComponentInstanceId` in class `org.silverpeas.core.persistence.datasource.repository.jpa.BasicJpaEntityRepository<ResourceValidator>`
    Parameters:
      `instanceId` - the unique instance identifier.
    Returns:
      the number of deleted entities.