Class User2UserHibernateRelationDao
- java.lang.Object
- 
- com.atlassian.confluence.internal.relations.dao.hibernate.HibernateRelationDao<ConfluenceUser,ConfluenceUser>
- 
- com.atlassian.confluence.internal.relations.dao.hibernate.User2UserHibernateRelationDao
 
 
- 
- All Implemented Interfaces:
- RelationDao<ConfluenceUser,ConfluenceUser>
 
 public class User2UserHibernateRelationDao extends HibernateRelationDao<ConfluenceUser,ConfluenceUser> - Since:
- 5.9
 
- 
- 
Field Summary- 
Fields inherited from class com.atlassian.confluence.internal.relations.dao.hibernate.HibernateRelationDaoBATCHING_CHUNK_SIZE, hibernate, RELATION_PARAM_NAME, sessionFactory, SOURCE_PARAM_NAME, TARGET_PARAM_NAME
 
- 
 - 
Constructor SummaryConstructors Constructor Description User2UserHibernateRelationDao(org.hibernate.SessionFactory sessionFactory)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description @Nullable User2UserRelationEntitygetRelationEntity(ConfluenceUser source, ConfluenceUser target, RelationDescriptor<?,?> relationDescriptor)Get relation for given content, type and name.intgetRelationsCount(ConfluenceUser source, ConfluenceUser target, RelationDescriptor<?,?> relationDescriptor)Get total number of relations for given content, type and name.@NonNull List<ConfluenceUser>getSources(RelationQuery<ConfluenceUser> request, int start, int limit)Fetch all related sources for the entity.intgetSourcesCount(RelationQuery<ConfluenceUser> request)Count of all related sources for the entity.@NonNull List<ConfluenceUser>getTargets(RelationQuery<ConfluenceUser> request, int start, int limit)Fetch all related targets for the entity.intgetTargetsCount(RelationQuery<ConfluenceUser> request)Count of all related targets for the entity.protected User2UserRelationEntitynewRelationEntity(ConfluenceUser source, ConfluenceUser target)intremoveAllRelations(RelatableEntity relatableEntity)This method removes all relations (across all names and types), where given entity participates.intremoveAllRelations(Iterable<? extends RelatableEntity> relatableEntities)This method removes all relations (across all names and types), where given entity participates.intremoveAllRelationsFromCurrentAndHistoricalEntities(RelatableEntity relatableEntity)This method removes all relations (across all names and types), where given entity participates.intremoveAllRelationsFromCurrentAndHistoricalEntities(Iterable<? extends RelatableEntity> relatableEntities)This method removes all relations (across all names and types), where given entity participates.intremoveAllRelationsFromEntityWithName(String relationName, RelatableEntity relatableEntity)This method remove all relations with the given name, where the given entity participates- 
Methods inherited from class com.atlassian.confluence.internal.relations.dao.hibernate.HibernateRelationDaoconstructRelationEntity, createRelationEntity, getRelationEntities, removeRelationEntity
 
- 
 
- 
- 
- 
Method Detail- 
getRelationsCountpublic int getRelationsCount(ConfluenceUser source, ConfluenceUser target, RelationDescriptor<?,?> relationDescriptor) Description copied from interface:RelationDaoGet total number of relations for given content, type and name.- relationDescriptor- specifies relation metadata, such as type and name
- Returns:
- total number of relations for given entities, relation type and name.
- See Also:
- RelationDescriptor
 
 - 
getRelationEntitypublic @Nullable User2UserRelationEntity getRelationEntity(ConfluenceUser source, ConfluenceUser target, RelationDescriptor<?,?> relationDescriptor) Description copied from interface:RelationDaoGet relation for given content, type and name.- relationDescriptor- specifies relation metadata, such as type and name
- Returns:
- RelationEntityor- nullif no relations found
 
 - 
getSourcespublic @NonNull List<ConfluenceUser> getSources(RelationQuery<ConfluenceUser> request, int start, int limit) Description copied from interface:RelationDaoFetch all related sources for the entity. Fetching parameters (relation name, filtering etc.) is provided byrequestargument- Returns:
- list of RelatableEntity
- See Also:
- RelationQuery
 
 - 
getTargetspublic @NonNull List<ConfluenceUser> getTargets(RelationQuery<ConfluenceUser> request, int start, int limit) Description copied from interface:RelationDaoFetch all related targets for the entity. Fetching parameters (relation name, filtering etc.) is provided byrequestargument- Returns:
- list of RelatableEntity
- See Also:
- RelationQuery
 
 - 
getSourcesCountpublic int getSourcesCount(RelationQuery<ConfluenceUser> request) Description copied from interface:RelationDaoCount of all related sources for the entity. Fetching parameters (relation name, filtering etc.) is provided byrequestargument- Returns:
- total number of all sources
 
 - 
getTargetsCountpublic int getTargetsCount(RelationQuery<ConfluenceUser> request) Description copied from interface:RelationDaoCount of all related targets for the entity. Fetching parameters (relation name, filtering etc.) is provided byrequestargument- Returns:
- total number of all targets
 
 - 
removeAllRelationspublic int removeAllRelations(RelatableEntity relatableEntity) Description copied from interface:RelationDaoThis method removes all relations (across all names and types), where given entity participates.- Returns:
- number of relations which were removed.
 
 - 
removeAllRelationspublic int removeAllRelations(Iterable<? extends RelatableEntity> relatableEntities) Description copied from interface:RelationDaoThis method removes all relations (across all names and types), where given entity participates.- Returns:
- number of relations which were removed.
 
 - 
removeAllRelationsFromEntityWithNamepublic int removeAllRelationsFromEntityWithName(String relationName, RelatableEntity relatableEntity) Description copied from interface:RelationDaoThis method remove all relations with the given name, where the given entity participates- Returns:
- number of relations which were removed
 
 - 
removeAllRelationsFromCurrentAndHistoricalEntitiespublic int removeAllRelationsFromCurrentAndHistoricalEntities(RelatableEntity relatableEntity) Description copied from interface:RelationDaoThis method removes all relations (across all names and types), where given entity participates. It also removes all relations from the historical versions of the given entity if the entity is the most current version of content- Returns:
- number of relations which were removed.
 
 - 
removeAllRelationsFromCurrentAndHistoricalEntitiespublic int removeAllRelationsFromCurrentAndHistoricalEntities(Iterable<? extends RelatableEntity> relatableEntities) Description copied from interface:RelationDaoThis method removes all relations (across all names and types), where given entity participates. It also removes all relations from the historical versions of the given entity if the entity is the most current version of content- Returns:
- number of relations which were removed
 
 - 
newRelationEntityprotected User2UserRelationEntity newRelationEntity(ConfluenceUser source, ConfluenceUser target) - Specified by:
- newRelationEntityin class- HibernateRelationDao<ConfluenceUser,ConfluenceUser>
 
 
- 
 
-