Package net.solarnetwork.central.biz.dao
Class DaoUserMetadataBiz
java.lang.Object
net.solarnetwork.central.biz.dao.DaoUserMetadataBiz
- All Implemented Interfaces:
UserMetadataBiz
DAO-based implementation of
UserMetadataBiz.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddUserMetadata(Long userId, net.solarnetwork.domain.datum.GeneralDatumMetadata meta) Add metadata to a specific user.net.solarnetwork.dao.FilterResults<UserMetadataEntity, Long> findUserMetadata(UserMetadataFilter criteria, List<net.solarnetwork.domain.SortDescriptor> sortDescriptors, Integer offset, Integer max) Search for user metadata.voidremoveUserMetadata(Long userId) Remove all metadata to a specific user.voidstoreUserMetadata(Long userId, net.solarnetwork.domain.datum.GeneralDatumMetadata meta) Store metadata to a specific user, replacing any existing metadata with the provided metadata.
-
Constructor Details
-
DaoUserMetadataBiz
Constructor.- Parameters:
userMetadataDao- the DAO to use
-
-
Method Details
-
addUserMetadata
@Transactional(readOnly=false, propagation=REQUIRED) public void addUserMetadata(Long userId, net.solarnetwork.domain.datum.GeneralDatumMetadata meta) Description copied from interface:UserMetadataBizAdd metadata to a specific user. If metadata already exists for the given user, the values will be merged such that tags are added and info values are added or updated.- Specified by:
addUserMetadatain interfaceUserMetadataBiz- Parameters:
userId- the user ID to add tometa- the metadata to add
-
storeUserMetadata
@Transactional(readOnly=false, propagation=REQUIRED) public void storeUserMetadata(Long userId, net.solarnetwork.domain.datum.GeneralDatumMetadata meta) Description copied from interface:UserMetadataBizStore metadata to a specific user, replacing any existing metadata with the provided metadata.- Specified by:
storeUserMetadatain interfaceUserMetadataBiz- Parameters:
userId- the user ID to add tometa- the metadata to store
-
removeUserMetadata
Description copied from interface:UserMetadataBizRemove all metadata to a specific user.- Specified by:
removeUserMetadatain interfaceUserMetadataBiz- Parameters:
userId- the user ID to remove from
-
findUserMetadata
@Transactional(readOnly=true, propagation=SUPPORTS) public net.solarnetwork.dao.FilterResults<UserMetadataEntity,Long> findUserMetadata(UserMetadataFilter criteria, List<net.solarnetwork.domain.SortDescriptor> sortDescriptors, Integer offset, Integer max) Description copied from interface:UserMetadataBizSearch for user metadata.- Specified by:
findUserMetadatain interfaceUserMetadataBiz- Parameters:
criteria- the search criteriasortDescriptors- the optional sort descriptorsoffset- an optional result offsetmax- an optional maximum number of returned results- Returns:
- the results, never null
-