Class HibernateRelationDao<S extends RelatableEntity,T extends RelatableEntity>
java.lang.Object
com.atlassian.confluence.internal.relations.dao.hibernate.HibernateRelationDao<S,T>
- All Implemented Interfaces:
RelationDao<S,
T>
- Direct Known Subclasses:
Content2ContentHibernateRelationDao
,User2ContentHibernateRelationDao
,User2UserHibernateRelationDao
public abstract class HibernateRelationDao<S extends RelatableEntity,T extends RelatableEntity>
extends Object
implements RelationDao<S,T>
- Since:
- 5.9
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected RelationEntity<S,
T> constructRelationEntity
(RelationEntity<S, T> relationEntity, S source, T target, RelationDescriptor<?, ?> relationDescriptor) createRelationEntity
(S source, T target, RelationDescriptor<?, ?> relationDescriptor) Create new relation.protected @NonNull List<RelationEntity<S,
T>> getRelationEntities
(String queryName, S source, T target, RelationDescriptor<?, ?> relationDescriptor) protected abstract RelationEntity<S,
T> newRelationEntity
(S source, T target) void
removeRelationEntity
(RelationEntity<S, T> relationEntity) Remove relationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.atlassian.confluence.internal.relations.dao.RelationDao
getRelationEntity, getRelationsCount, getSources, getSourcesCount, getTargets, getTargetsCount, removeAllRelations, removeAllRelations, removeAllRelationsFromCurrentAndHistoricalEntities, removeAllRelationsFromCurrentAndHistoricalEntities, removeAllRelationsFromEntityWithName
-
Field Details
-
SOURCE_PARAM_NAME
- See Also:
-
TARGET_PARAM_NAME
- See Also:
-
RELATION_PARAM_NAME
- See Also:
-
BATCHING_CHUNK_SIZE
protected static final int BATCHING_CHUNK_SIZE- See Also:
-
hibernate
protected final org.springframework.orm.hibernate5.HibernateTemplate hibernate -
sessionFactory
protected final org.hibernate.engine.spi.SessionFactoryImplementor sessionFactory
-
-
Constructor Details
-
HibernateRelationDao
public HibernateRelationDao(org.hibernate.SessionFactory sessionFactory)
-
-
Method Details
-
createRelationEntity
public RelationEntity<S,T> createRelationEntity(S source, T target, RelationDescriptor<?, ?> relationDescriptor) Description copied from interface:RelationDao
Create new relation. and saves it to the database- Specified by:
createRelationEntity
in interfaceRelationDao<S extends RelatableEntity,
T extends RelatableEntity> relationDescriptor
- specifies relation metadata, such as type and name- See Also:
-
removeRelationEntity
Description copied from interface:RelationDao
Remove relation- Specified by:
removeRelationEntity
in interfaceRelationDao<S extends RelatableEntity,
T extends RelatableEntity> - See Also:
-
getRelationEntities
protected @NonNull List<RelationEntity<S,T>> getRelationEntities(String queryName, S source, T target, RelationDescriptor<?, ?> relationDescriptor) -
newRelationEntity
-
constructRelationEntity
protected RelationEntity<S,T> constructRelationEntity(RelationEntity<S, T> relationEntity, S source, T target, RelationDescriptor<?, ?> relationDescriptor)
-