Interface GenericCompositeKey3Dao<T extends net.solarnetwork.dao.Entity<K>,K extends CompositeKey3<K1,K2,K3>,K1,K2,K3>

Type Parameters:
T - the entity type managed by this DAO
K - the entity composite primary key type
K1 - the primary key's first component
K2 - the primary key's second component
K3 - the primary key's third component
All Superinterfaces:
GenericCompositeKeyFilterableDao<T,K>, net.solarnetwork.dao.GenericDao<T,K>

public interface GenericCompositeKey3Dao<T extends net.solarnetwork.dao.Entity<K>,K extends CompositeKey3<K1,K2,K3>,K1,K2,K3> extends net.solarnetwork.dao.GenericDao<T,K>, GenericCompositeKeyFilterableDao<T,K>
DAO API using a composite key of 3 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
    create(K1 keyComponent1, K2 keyComponent2, T entity)
    Create an entity using a specific first key component, assuming the second component is generated by the database.
    findAll(K1 keyComponent1, K2 keyComponent2, List<net.solarnetwork.domain.SortDescriptor> sorts)
    Find all persisted entities available matching the first key component, optionally sorted in some way.
    default 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.

    Methods inherited from interface net.solarnetwork.dao.GenericDao

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

    • create

      K create(K1 keyComponent1, K2 keyComponent2, T entity)
      Create an entity using a specific first key component, assuming the second component is generated by the database.
      Parameters:
      keyComponent1 - the assigned first key component
      keyComponent2 - the assigned second key component
      entity - the domain object so store; the Identity.getId() of the entity will be ignored
      Returns:
      the primary key of the stored object
    • findAll

      Collection<T> findAll(K1 keyComponent1, K2 keyComponent2, List<net.solarnetwork.domain.SortDescriptor> sorts)
      Find all persisted entities available matching the first key component, optionally sorted in some way.

      The sortDescriptors parameter can be null, in which case the sort order is not defined and implementation specific.

      Parameters:
      keyComponent1 - the first key component to restrict the results to
      keyComponent2 - the second key component 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
    • findAllForKey

      default Collection<T> findAllForKey(K filter, List<net.solarnetwork.domain.SortDescriptor> sorts)
      Description copied from interface: GenericCompositeKeyFilterableDao
      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.

      Specified by:
      findAllForKey in interface GenericCompositeKeyFilterableDao<T extends net.solarnetwork.dao.Entity<K>,K extends CompositeKey3<K1,K2,K3>>
      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