Interface GenericCompositeKeyFilterableDao<T extends net.solarnetwork.dao.Entity<K>,K extends CompositeKey>

All Superinterfaces:
net.solarnetwork.dao.GenericDao<T,K>
All Known Subinterfaces:
GenericCompositeKey2Dao<T,K,K1,K2>, GenericCompositeKey3Dao<T,K,K1,K2,K3>

public interface GenericCompositeKeyFilterableDao<T extends net.solarnetwork.dao.Entity<K>,K extends CompositeKey> extends net.solarnetwork.dao.GenericDao<T,K>
API for a DAO that can filter by composite key components.
  • 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 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
  • Method Summary

    Modifier and Type
    Method
    Description
    findAllForKey(K filter, List<net.solarnetwork.domain.SortDescriptor> sorts)
    Find all persisted entities available matching the components of a composite key, optionally sorted in some way.

    Methods inherited from interface net.solarnetwork.dao.GenericDao

    delete, entityEventTopic, entityKey, get, getAll, getObjectType, save
  • Method Details

    • findAllForKey

      Collection<T> findAllForKey(K filter, List<net.solarnetwork.domain.SortDescriptor> sorts)
      Find all persisted entities available matching the components of a composite key, optionally sorted in some way.

      Only key components that are assigned are used to filter the result. The sortDescriptors parameter can be null, in which case the sort order is not defined and implementation specific.

      Parameters:
      filter - the key that acts like a filter to restrict the results to
      sorts - list of sort descriptors to sort the results by
      Returns:
      list of all persisted entities, or empty list if none available