public class User2ContentHibernateRelationDao extends HibernateRelationDao<ConfluenceUser,ContentEntityObject>
BATCHING_CHUNK_SIZE, hibernate, RELATION_PARAM_NAME, sessionFactory, SOURCE_PARAM_NAME, TARGET_PARAM_NAME| Constructor and Description | 
|---|
| User2ContentHibernateRelationDao(org.hibernate.SessionFactory sessionFactory) | 
| Modifier and Type | Method and Description | 
|---|---|
| protected RelationEntity<ConfluenceUser,ContentEntityObject> | constructRelationEntity(RelationEntity<ConfluenceUser,ContentEntityObject> relationEntity,
                       ConfluenceUser source,
                       ContentEntityObject target,
                       RelationDescriptor<?,?> relationDescriptor) | 
| List<Long> | getAllRelationIdsForContentInSpace(@NonNull String spaceKey,
                                  @NonNull Collection<ConfluenceEntityObject> exclusions,
                                  int start,
                                  int limit)This method returns ids of all content relation entities in space. | 
| @Nullable User2ContentRelationEntity | getRelationEntity(ConfluenceUser source,
                 ContentEntityObject target,
                 RelationDescriptor<?,?> relationDescriptor)Get relation for given content, type and name. | 
| int | getRelationsCount(ConfluenceUser source,
                 ContentEntityObject target,
                 RelationDescriptor<?,?> relationDescriptor)Get total number of relations for given content, type and name. | 
| @NonNull List<ConfluenceUser> | getSources(RelationQuery<ContentEntityObject> request,
          int start,
          int limit)Fetch all related sources for the entity. | 
| int | getSourcesCount(RelationQuery<ContentEntityObject> request)Count of all related sources for the entity. | 
| @NonNull List<ContentEntityObject> | getTargets(RelationQuery<ConfluenceUser> request,
          int start,
          int limit)Fetch all related targets for the entity. | 
| int | getTargetsCount(RelationQuery<ConfluenceUser> request)Count of all related targets for the entity. | 
| protected User2ContentRelationEntity | newRelationEntity(ConfluenceUser source,
                 ContentEntityObject target) | 
| int | removeAllRelations(Iterable<? extends RelatableEntity> relatableEntities)This method removes all relations (across all names and types), where given entity participates. | 
| int | removeAllRelations(RelatableEntity relatableEntity)This method removes all relations (across all names and types), where given entity participates. | 
| int | removeAllRelationsFromCurrentAndHistoricalEntities(Iterable<? extends RelatableEntity> relatableEntities)This method removes all relations (across all names and types), where given entity participates. | 
| int | removeAllRelationsFromCurrentAndHistoricalEntities(RelatableEntity relatableEntity)This method removes all relations (across all names and types), where given entity participates. | 
| int | removeAllRelationsFromEntityWithName(String relationName,
                                    RelatableEntity relatableEntity)This method remove all relations with the given name, where the given entity participates | 
createRelationEntity, getRelationEntities, removeRelationEntitypublic User2ContentHibernateRelationDao(org.hibernate.SessionFactory sessionFactory)
public int getRelationsCount(ConfluenceUser source, ContentEntityObject target, RelationDescriptor<?,?> relationDescriptor)
RelationDaorelationDescriptor - specifies relation metadata, such as type and nameRelationDescriptorpublic @Nullable User2ContentRelationEntity getRelationEntity(ConfluenceUser source, ContentEntityObject target, RelationDescriptor<?,?> relationDescriptor)
RelationDaorelationDescriptor - specifies relation metadata, such as type and nameRelationEntity or null if no relations foundpublic @NonNull List<ConfluenceUser> getSources(RelationQuery<ContentEntityObject> request, int start, int limit)
RelationDaorequest argumentRelatableEntityRelationQuerypublic @NonNull List<ContentEntityObject> getTargets(RelationQuery<ConfluenceUser> request, int start, int limit)
RelationDaorequest argumentRelatableEntityRelationQuerypublic int getSourcesCount(RelationQuery<ContentEntityObject> request)
RelationDaorequest argumentpublic int getTargetsCount(RelationQuery<ConfluenceUser> request)
RelationDaorequest argumentpublic int removeAllRelations(RelatableEntity relatableEntity)
RelationDaopublic int removeAllRelations(Iterable<? extends RelatableEntity> relatableEntities)
RelationDaopublic int removeAllRelationsFromEntityWithName(String relationName, RelatableEntity relatableEntity)
RelationDaopublic int removeAllRelationsFromCurrentAndHistoricalEntities(RelatableEntity relatableEntity)
RelationDaopublic int removeAllRelationsFromCurrentAndHistoricalEntities(Iterable<? extends RelatableEntity> relatableEntities)
RelationDaopublic List<Long> getAllRelationIdsForContentInSpace(@NonNull String spaceKey, @NonNull Collection<ConfluenceEntityObject> exclusions, int start, int limit)
spaceKey - spaceexclusions - list of exclusionsstart - startlimit - limitprotected User2ContentRelationEntity newRelationEntity(ConfluenceUser source, ContentEntityObject target)
newRelationEntity in class HibernateRelationDao<ConfluenceUser,ContentEntityObject>protected RelationEntity<ConfluenceUser,ContentEntityObject> constructRelationEntity(RelationEntity<ConfluenceUser,ContentEntityObject> relationEntity, ConfluenceUser source, ContentEntityObject target, RelationDescriptor<?,?> relationDescriptor)
constructRelationEntity in class HibernateRelationDao<ConfluenceUser,ContentEntityObject>Copyright © 2003–2022 Atlassian. All rights reserved.