Class DaoUserMetadataBiz

java.lang.Object
net.solarnetwork.central.biz.dao.DaoUserMetadataBiz
All Implemented Interfaces:
UserMetadataBiz

public class DaoUserMetadataBiz extends Object implements UserMetadataBiz
DAO-based implementation of UserMetadataBiz.
  • Constructor Details

    • DaoUserMetadataBiz

      public DaoUserMetadataBiz(UserMetadataDao userMetadataDao)
      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: UserMetadataBiz
      Add 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:
      addUserMetadata in interface UserMetadataBiz
      Parameters:
      userId - the user ID to add to
      meta - 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: UserMetadataBiz
      Store metadata to a specific user, replacing any existing metadata with the provided metadata.
      Specified by:
      storeUserMetadata in interface UserMetadataBiz
      Parameters:
      userId - the user ID to add to
      meta - the metadata to store
    • removeUserMetadata

      @Transactional(readOnly=false, propagation=REQUIRED) public void removeUserMetadata(Long userId)
      Description copied from interface: UserMetadataBiz
      Remove all metadata to a specific user.
      Specified by:
      removeUserMetadata in interface UserMetadataBiz
      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: UserMetadataBiz
      Search for user metadata.
      Specified by:
      findUserMetadata in interface UserMetadataBiz
      Parameters:
      criteria - the search criteria
      sortDescriptors - the optional sort descriptors
      offset - an optional result offset
      max - an optional maximum number of returned results
      Returns:
      the results, never null