Class PdcClassificationRepository
- java.lang.Object
-
- org.silverpeas.core.persistence.datasource.repository.jpa.AbstractJpaEntityRepository<E>
-
- org.silverpeas.core.persistence.datasource.repository.jpa.BasicJpaEntityRepository<PdcClassification>
-
- org.silverpeas.core.pdc.pdc.service.PdcClassificationRepository
-
- All Implemented Interfaces:
EntityRepository<PdcClassification>
,WithSaveAndFlush<PdcClassification>
@Repository public class PdcClassificationRepository extends BasicJpaEntityRepository<PdcClassification>
DAO that handles the persistence of PdcClassification beans.
-
-
Constructor Summary
Constructors Constructor Description PdcClassificationRepository()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deleteAllClassificationsByComponentInstanceId(String instanceId)
Deletes all the classifications (both the predefined ones and the content's ones) that were set in the specified component instance.List<PdcClassification>
findClassificationsByPdcAxisValues(List<PdcAxisValue> values)
Finds all classifications on the PdC that have at least one position with the one or more of the specified axis values.PdcClassification
findPredefinedClassificationByComponentInstanceId(String instanceId)
Finds the predefined classification on the PdC that is set for the whole specified component instance.PdcClassification
findPredefinedClassificationByNodeId(String nodeId, String instanceId)
Finds the predefined classification on the PdC that is set for the contents in the specified node of the specified component instance.-
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
delete, deleteById, getById, save, save
-
-
-
-
Method Detail
-
findPredefinedClassificationByComponentInstanceId
public PdcClassification findPredefinedClassificationByComponentInstanceId(String instanceId)
Finds the predefined classification on the PdC that is set for the whole specified component instance.- Parameters:
instanceId
- the unique identifier of the component instance.- Returns:
- the predefined classification that is set to the component instance, or null if no predefined classification was set for the component instance.
-
findPredefinedClassificationByNodeId
public PdcClassification findPredefinedClassificationByNodeId(String nodeId, String instanceId)
Finds the predefined classification on the PdC that is set for the contents in the specified node of the specified component instance.- Parameters:
nodeId
- the unique identifier of the node.instanceId
- the unique identifier of the component instance to which the node belongs.- Returns:
- either the predefined classification associated with the node or null if no predefined classification exists for that node.
-
findClassificationsByPdcAxisValues
public List<PdcClassification> findClassificationsByPdcAxisValues(List<PdcAxisValue> values)
Finds all classifications on the PdC that have at least one position with the one or more of the specified axis values. If no such values exist, then an empty list is returned.- Parameters:
values
- a list of PdC's axis values.- Returns:
- a list of classifications having at least one of the specified values or an empty list.
-
deleteAllClassificationsByComponentInstanceId
public void deleteAllClassificationsByComponentInstanceId(String instanceId)
Deletes all the classifications (both the predefined ones and the content's ones) that were set in the specified component instance. This method is generally used when a component instance is being deleted.- Parameters:
instanceId
- the unique identifier of the component instance.
-
-