public class User2ContentHibernateRelationDao extends HibernateRelationDao<ConfluenceUser,ContentEntityObject>
hibernate, RELATION_PARAM_NAME, SOURCE_PARAM_NAME, TARGET_PARAM_NAME
Constructor and Description |
---|
User2ContentHibernateRelationDao(net.sf.hibernate.SessionFactory sessionFactory) |
Modifier and Type | Method and Description |
---|---|
List<Long> |
getAllRelationIdsForContentInSpace(String spaceKey,
Collection<ConfluenceEntityObject> exclusions,
int start,
int limit)
This method returns ids of all content relation entities in space.
|
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.
|
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.
|
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(RelatableEntity relatableEntity)
This method removes all relations (across all names and types), where given entity participates.
|
createRelationEntity, getRelationEntities, removeRelationEntity
public User2ContentHibernateRelationDao(net.sf.hibernate.SessionFactory sessionFactory)
public int getRelationsCount(ConfluenceUser source, ContentEntityObject target, RelationDescriptor relationDescriptor)
RelationDao
relationDescriptor
- specifies relation metadata, such as type and nameRelationDescriptor
@Nullable public User2ContentRelationEntity getRelationEntity(ConfluenceUser source, ContentEntityObject target, RelationDescriptor relationDescriptor)
RelationDao
relationDescriptor
- specifies relation metadata, such as type and nameRelationEntity
or null
if no relations found@Nonnull public List<ConfluenceUser> getSources(RelationQuery<ContentEntityObject> request, int start, int limit)
RelationDao
request
argumentRelatableEntity
RelationQuery
@Nonnull public List<ContentEntityObject> getTargets(RelationQuery<ConfluenceUser> request, int start, int limit)
RelationDao
request
argumentRelatableEntity
RelationQuery
public int getSourcesCount(RelationQuery<ContentEntityObject> request)
RelationDao
request
argumentpublic int getTargetsCount(RelationQuery<ConfluenceUser> request)
RelationDao
request
argumentpublic int removeAllRelations(RelatableEntity relatableEntity)
RelationDao
public 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>
Copyright © 2003–2016 Atlassian. All rights reserved.