T - An InternalDirectoryEntity, which an implementation of this DAO is handlingU - An InternalEntityAttribute, which the T type uses for its attributespublic abstract class InternalDirectoryEntityHibernateDao<T extends InternalDirectoryEntity<U>,U extends InternalEntityAttribute> extends HibernateDao
InternalDirectoryEntity, it has common logic for operating on attributesbatchFinder, batchProcessor, logger, statelessSessionBatchProcessor, timeSourcesessionFactory| Constructor and Description |
|---|
InternalDirectoryEntityHibernateDao() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
addAttribute(T entity,
String attributeName,
String attributeValue) |
abstract T |
findByName(long directoryId,
String entityName) |
protected <V> List<V> |
processBatchedQueryResultsIfNecessary(List<V> results,
EntityQuery<V> query,
boolean wasQueryBatched) |
void |
removeAttribute(T entity,
String attributeName) |
void |
removeAttribute(T entity,
String attributeName,
String attributeValue) |
protected void |
storeAttributes(T entityWithAttributes,
Map<String,Set<String>> attributesToSet)
Stores entity attributes.
|
protected void |
updateTimestamps(InternalEntity entity,
boolean updateCreatedDate) |
createHibernateQuery, getPersistentClass, load, load, loadReference, loadReference, remove, save, saveOrUpdate, session, setBatchFinder, setBatchProcessor, setClock, setStatelessSessionBatchProcessor, updatesetSessionFactory, withStatelessSessionpublic abstract void addAttribute(T entity, String attributeName, String attributeValue)
protected void updateTimestamps(InternalEntity entity, boolean updateCreatedDate)
public abstract T findByName(long directoryId, String entityName) throws ObjectNotFoundException
ObjectNotFoundExceptionprotected void storeAttributes(T entityWithAttributes, Map<String,Set<String>> attributesToSet)
removeAttribute(InternalDirectoryEntity, String) should be used instead.entityWithAttributes - The InternalDirectoryEntity which will have its attributes updatedattributesToSet - A map of attributes to attribute values which will be updated/added to entityWithAttributesprotected <V> List<V> processBatchedQueryResultsIfNecessary(List<V> results, EntityQuery<V> query, boolean wasQueryBatched)
Copyright © 2018 Atlassian. All rights reserved.