public class CachingPersistentDecoratorDao extends Object implements PersistentDecoratorDao, PersistentDecoratorCachePrimer.Primeable
PersistentDecoratorDao
which combines a cache with Hibernate.Constructor and Description |
---|
CachingPersistentDecoratorDao(org.hibernate.SessionFactory sessionFactory,
com.atlassian.vcache.VCacheFactory cacheFactory) |
Modifier and Type | Method and Description |
---|---|
PersistentDecorator |
get(String spaceKey,
String decoratorName) |
void |
prime()
Primes cache
|
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)
|
public CachingPersistentDecoratorDao(org.hibernate.SessionFactory sessionFactory, com.atlassian.vcache.VCacheFactory cacheFactory)
public void saveOrUpdate(PersistentDecorator decorator)
saveOrUpdate
in interface PersistentDecoratorDao
@Nullable public PersistentDecorator get(@Nullable String spaceKey, String decoratorName)
get
in interface PersistentDecoratorDao
public void remove(PersistentDecorator decorator)
remove
in interface PersistentDecoratorDao
public void prime()
PersistentDecoratorCachePrimer.Primeable
prime
in interface PersistentDecoratorCachePrimer.Primeable
Copyright © 2003–2017 Atlassian. All rights reserved.