public abstract class HibernateRelationDao<S extends RelatableEntity,T extends RelatableEntity> extends Object implements RelationDao<S,T>
Modifier and Type | Field and Description |
---|---|
protected static int |
BATCHING_CHUNK_SIZE |
protected org.springframework.orm.hibernate5.HibernateTemplate |
hibernate |
protected static String |
RELATION_PARAM_NAME |
protected org.hibernate.engine.spi.SessionFactoryImplementor |
sessionFactory |
protected static String |
SOURCE_PARAM_NAME |
protected static String |
TARGET_PARAM_NAME |
Constructor and Description |
---|
HibernateRelationDao(org.hibernate.SessionFactory sessionFactory) |
Modifier and Type | Method and Description |
---|---|
protected RelationEntity<S,T> |
constructRelationEntity(RelationEntity<S,T> relationEntity,
S source,
T target,
RelationDescriptor<?,?> relationDescriptor) |
RelationEntity<S,T> |
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 relation
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getRelationEntity, getRelationsCount, getSources, getSourcesCount, getTargets, getTargetsCount, removeAllRelations, removeAllRelations, removeAllRelationsFromCurrentAndHistoricalEntities, removeAllRelationsFromCurrentAndHistoricalEntities, removeAllRelationsFromEntityWithName
protected static final String SOURCE_PARAM_NAME
protected static final String TARGET_PARAM_NAME
protected static final String RELATION_PARAM_NAME
protected static final int BATCHING_CHUNK_SIZE
protected final org.springframework.orm.hibernate5.HibernateTemplate hibernate
protected final org.hibernate.engine.spi.SessionFactoryImplementor sessionFactory
public HibernateRelationDao(org.hibernate.SessionFactory sessionFactory)
public RelationEntity<S,T> createRelationEntity(S source, T target, RelationDescriptor<?,?> relationDescriptor)
RelationDao
createRelationEntity
in interface RelationDao<S extends RelatableEntity,T extends RelatableEntity>
relationDescriptor
- specifies relation metadata, such as type and nameRelationEntity
public void removeRelationEntity(RelationEntity<S,T> relationEntity)
RelationDao
removeRelationEntity
in interface RelationDao<S extends RelatableEntity,T extends RelatableEntity>
RelationEntity
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)
protected RelationEntity<S,T> constructRelationEntity(RelationEntity<S,T> relationEntity, S source, T target, RelationDescriptor<?,?> relationDescriptor)
Copyright © 2003–2020 Atlassian. All rights reserved.