Package net.solarnetwork.central.dao
Class CachingUserMetadataDao
java.lang.Object
net.solarnetwork.central.common.dao.CachingGenericDao<UserMetadataEntity,Long,UserMetadataDao>
net.solarnetwork.central.dao.CachingUserMetadataDao
- All Implemented Interfaces:
UserMetadataDao,net.solarnetwork.dao.FilterableDao<UserMetadataEntity,,Long, UserMetadataFilter> net.solarnetwork.dao.GenericDao<UserMetadataEntity,Long>
public class CachingUserMetadataDao
extends CachingGenericDao<UserMetadataEntity,Long,UserMetadataDao>
implements UserMetadataDao
Caching implementation of
UserMetadataDao.-
Nested Class Summary
Nested classes/interfaces inherited from interface net.solarnetwork.dao.GenericDao
net.solarnetwork.dao.GenericDao.EntityEventType, net.solarnetwork.dao.GenericDao.StandardSortKey -
Field Summary
Fields inherited from class net.solarnetwork.central.common.dao.CachingGenericDao
cache, delegate, executorFields inherited from interface net.solarnetwork.dao.GenericDao
ENTITY_EVENT_ENTITY_ID_PROPERTY, ENTITY_EVENT_ENTITY_PROPERTY, ENTITY_EVENT_TOPIC_TEMPLATE, SORT_BY_CREATED_ASCENDING, SORT_BY_CREATED_DESCENDING, SORT_BY_CREATED_ID_ASCENDING, SORT_BY_CREATED_ID_DESCENDING, SORT_BY_ID_ASCENDING, SORT_BY_ID_DESCENDING -
Constructor Summary
ConstructorsConstructorDescriptionCachingUserMetadataDao(UserMetadataDao delegate, javax.cache.Cache<Long, UserMetadataEntity> cache, Executor executor, javax.cache.Cache<UserStringCompositePK, String> metadataPathCache) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionnet.solarnetwork.dao.FilterResults<UserMetadataEntity, Long> findFiltered(UserMetadataFilter filter, List<net.solarnetwork.domain.SortDescriptor> sorts, Integer offset, Integer max) jsonMetadataAtPath(Long userId, String path) Extract metadata at a given path as a JSON string.Methods inherited from class net.solarnetwork.central.common.dao.CachingGenericDao
delete, entityEventTopic, evictKeysMatching, get, getAll, getObjectType, saveMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.solarnetwork.dao.FilterableDao
findFilteredMethods inherited from interface net.solarnetwork.dao.GenericDao
delete, entityEventTopic, entityKey, get, getAll, getObjectType, save
-
Constructor Details
-
CachingUserMetadataDao
public CachingUserMetadataDao(UserMetadataDao delegate, javax.cache.Cache<Long, UserMetadataEntity> cache, Executor executor, javax.cache.Cache<UserStringCompositePK, String> metadataPathCache) Constructor.- Parameters:
delegate- the delegate DAOcache- the cacheexecutor- task executor- Throws:
IllegalArgumentException- if any argument is null
-
-
Method Details
-
findFiltered
public net.solarnetwork.dao.FilterResults<UserMetadataEntity,Long> findFiltered(UserMetadataFilter filter, List<net.solarnetwork.domain.SortDescriptor> sorts, Integer offset, Integer max) - Specified by:
findFilteredin interfacenet.solarnetwork.dao.FilterableDao<UserMetadataEntity,Long, UserMetadataFilter>
-
jsonMetadataAtPath
Description copied from interface:UserMetadataDaoExtract metadata at a given path as a JSON string.The
pathis a URL-like path, such as /pm/some/thing.- Specified by:
jsonMetadataAtPathin interfaceUserMetadataDao- Parameters:
userId- the user ID to extract metadata forpath- the path to extract- Returns:
- the metadata object
- See Also:
-