public class User2UserHibernateRelationDao extends HibernateRelationDao<ConfluenceUser,ConfluenceUser>
hibernate, RELATION_PARAM_NAME, sessionFactory, SOURCE_PARAM_NAME, TARGET_PARAM_NAME| Constructor and Description |
|---|
User2UserHibernateRelationDao(org.hibernate.SessionFactory sessionFactory) |
| Modifier and Type | Method and Description |
|---|---|
User2UserRelationEntity |
getRelationEntity(ConfluenceUser source,
ConfluenceUser target,
RelationDescriptor relationDescriptor)
Get relation for given content, type and name.
|
int |
getRelationsCount(ConfluenceUser source,
ConfluenceUser target,
RelationDescriptor relationDescriptor)
Get total number of relations for given content, type and name.
|
List<ConfluenceUser> |
getSources(RelationQuery<ConfluenceUser> request,
int start,
int limit)
Fetch all related sources for the entity.
|
int |
getSourcesCount(RelationQuery<ConfluenceUser> request)
Count of all related sources for the entity.
|
List<ConfluenceUser> |
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 User2UserRelationEntity |
newRelationEntity(ConfluenceUser source,
ConfluenceUser target) |
int |
removeAllRelations(RelatableEntity relatableEntity)
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
|
constructRelationEntity, createRelationEntity, getRelationEntities, removeRelationEntitypublic User2UserHibernateRelationDao(org.hibernate.SessionFactory sessionFactory)
public int getRelationsCount(ConfluenceUser source, ConfluenceUser target, RelationDescriptor relationDescriptor)
RelationDaorelationDescriptor - specifies relation metadata, such as type and nameRelationDescriptor@Nullable public User2UserRelationEntity getRelationEntity(ConfluenceUser source, ConfluenceUser target, RelationDescriptor relationDescriptor)
RelationDaorelationDescriptor - specifies relation metadata, such as type and nameRelationEntity or null if no relations found@Nonnull public List<ConfluenceUser> getSources(RelationQuery<ConfluenceUser> request, int start, int limit)
RelationDaorequest argumentRelatableEntityRelationQuery@Nonnull public List<ConfluenceUser> getTargets(RelationQuery<ConfluenceUser> request, int start, int limit)
RelationDaorequest argumentRelatableEntityRelationQuerypublic int getSourcesCount(RelationQuery<ConfluenceUser> request)
RelationDaorequest argumentpublic int getTargetsCount(RelationQuery<ConfluenceUser> request)
RelationDaorequest argumentpublic int removeAllRelations(RelatableEntity relatableEntity)
RelationDaopublic int removeAllRelationsFromEntityWithName(String relationName, RelatableEntity relatableEntity)
RelationDaopublic int removeAllRelationsFromCurrentAndHistoricalEntities(RelatableEntity relatableEntity)
RelationDaoprotected User2UserRelationEntity newRelationEntity(ConfluenceUser source, ConfluenceUser target)
newRelationEntity in class HibernateRelationDao<ConfluenceUser,ConfluenceUser>Copyright © 2003–2017 Atlassian. All rights reserved.