Class CachingPersistentDecoratorDao
- java.lang.Object
-
- com.atlassian.confluence.impl.themes.persistence.CachingPersistentDecoratorDao
-
- All Implemented Interfaces:
PersistentDecoratorDao
public class CachingPersistentDecoratorDao extends Object implements PersistentDecoratorDao
An implementation ofPersistentDecoratorDao
which combines a cache with Hibernate.- Since:
- 5.10
-
-
Constructor Summary
Constructors Constructor Description CachingPersistentDecoratorDao(org.hibernate.SessionFactory sessionFactory, com.atlassian.cache.CacheFactory cacheFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @Nullable PersistentDecorator
get(@Nullable String spaceKey, String decoratorName)
void
remove(PersistentDecorator decorator)
void
saveOrUpdate(PersistentDecorator decorator)
If a decorator already exists with a certain space key and name, we should try to update it (and not try to create a new one just because the body field is different) (a composite key has not been used for space key and name because spacek key can be null)
-
-
-
Method Detail
-
saveOrUpdate
public void saveOrUpdate(PersistentDecorator decorator)
If a decorator already exists with a certain space key and name, we should try to update it (and not try to create a new one just because the body field is different) (a composite key has not been used for space key and name because spacek key can be null)- Specified by:
saveOrUpdate
in interfacePersistentDecoratorDao
-
get
public @Nullable PersistentDecorator get(@Nullable String spaceKey, String decoratorName)
- Specified by:
get
in interfacePersistentDecoratorDao
-
remove
public void remove(PersistentDecorator decorator)
- Specified by:
remove
in interfacePersistentDecoratorDao
-
-