com.h3c.sdn.adm.dao

## Interface QueryService

-     public interface QueryService

  Basic interface for defining query operations that can be executed against the persistence layer.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `WriteQuery<Long>` | `getAddAlertListQuery(List<Alert> alerts)` Creates a write query to add a list of alerts to the persistence.
    `WriteQuery<Boolean>` | `getAddAlertQuery(Alert alert)` Creates a write query to add a new Alert to the system.
    `WriteQuery<AlertTopicListener>` | `getAddAlertTopicListenerQuery(AlertTopicListener atl)` Creates a write query to add a new Alert Topic Listener to the system.
    `WriteQuery<Long>` | `getAddAuditLogEntryListQuery(List<AuditLogEntry> auditLogs)` Creates a write query to add a list of AuditLogEntry objects to the persistence data store.
    `WriteQuery<Boolean>` | `getAddAuditLogEntryQuery(AuditLogEntry log)` Creates a write query to add a new AuditLogEntry to the system.
    `WriteQuery<CtlAddrEntity>` | `getAddCtlAddrManagerQuery(CtlAddrEntity ctlAddrManager)`
    `WriteQuery<HostEntity>` | `getAddHostManagerQuery(HostEntity hostManager)`
    `WriteQuery<LicenseKey>` | `getAddLicenseQuery(LicenseKey licenseKey)` Creates a write query to add a new license.
    `WriteQuery<LicInstallId>` | `getAddLicInstallIdQuery(LicInstallId licInstallId)` Creates a write query to add a new license install id.
    `WriteQuery<Region>` | `getAddRegionQuery(Region region)` Creates a write query to add a new Region to the system.
    `WriteQuery<Boolean>` | `getAddSystemInformationQuery(SystemInformation systemInformation)` Creates a query to add a system information.
    `ReadQuery<Long>` | `getCountAlertQuery()` Creates a query to retrieve the count of alerts in persistence.
    `ReadQuery<Long>` | `getCountAuditLogEntryQuery(AuditLogFilter filter)` Creates a query to retrieve the count of AuditLogEntry objects based on the supplied filter.
    `WriteQuery<Long>` | `getDeleteAlertListQuery(List<String> uids, String sysId)` Creates a query to delete a list of alerts.
    `WriteQuery<Void>` | `getDeleteAlertTopicListenerQuery(AlertTopicListener atl)` Creates a delete query to remove an alert topic listener.
    `WriteQuery<Long>` | `getDeleteCtlAddrManagerQuery(CtlAddrManagerFilter filter)`
    `WriteQuery<Long>` | `getDeleteHostManagerQuery(HostManagerFilter filter)`
    `WriteQuery<Void>` | `getDeleteLicenseQuery(LicenseKey licenseKey)` Creates a delete query to remove a license.
    `WriteQuery<Void>` | `getDeleteLicInstallIdQuery(LicInstallId licInstallId)` Creates a query to delete install id the database.
    `WriteQuery<Void>` | `getDeleteRegionQuery(Region region)` Creates a delete query to remove a region.
    `WriteQuery<Void>` | `getDeleteSystemInformationQuery(Id<SystemInformation,UUID> id)` Creates a query that deletes a system.
    `WriteQuery<Long>` | `getDeleteSystemsQuery(SystemInformationFilter filter)` Creates a query to delete systems from the database.
    `ReadQuery<List<Alert>>` | `getFindAlertsQuery(AlertFilter filter, SortSpecification<AlertSortAttribute> sortSpecification)` Creates a query that will find Alerts based on the supplied query criteria.
    `ReadQuery<List<AlertTopicListener>>` | `getFindAlertTopicListenersQuery()` Creates a query that will find all Alert Topic Listeners.
    `ReadQuery<List<AuditLogEntry>>` | `getFindAuditLogQuery(AuditLogFilter filter, SortSpecification<AuditLogSortAttribute> sortSpecification)` Creates a query that will find AuditLogEntry objects based on the supplied query criteria.
    `ReadQuery<Page<CtlAddrEntity>>` | `getFindCtlAddrManagerQuery(CtlAddrManagerFilter filter, SortSpecification<CtlAddrManagerSortAttribute> sortSpec, PageRequest pageRequest)`
    `ReadQuery<Page<HostEntity>>` | `getFindHostManageruery(HostManagerFilter filter, SortSpecification<HostManagerSortAttribute> sortSpec, PageRequest pageRequest)`
    `ReadQuery<List<LicenseKey>>` | `getFindLicensesQuery()` Creates a find query that will find all LicenseKey objects.
    `ReadQuery<List<LicInstallId>>` | `getFindLicInstallIdsQuery()` Creates a find query that will find all LicInstallId objects.
    `ReadQuery<List<Region>>` | `getFindRegionsQuery()` Creates a query that will find all regions.
    `ReadQuery<List<SystemInformation>>` | `getFindSystemsQuery(SystemInformationFilter filter, SortSpecification<SystemInformationSortAttribute> sortSpecification)` Creates a query to find systems in the database.
    `ReadQuery<Alert>` | `getGetAlertQuery(Id<Alert,UUID> id)` Creates a query that gets an alert by its id.
    `ReadQuery<AlertTopicListener>` | `getGetAlertTopicListenerQuery(Id<AlertTopicListener,UUID> id)` Creates a query that gets an alert topic listener by its id.
    `ReadQuery<AuditLogEntry>` | `getGetAuditLogQuery(Id<AuditLogEntry,UUID> id)` Creates a query that gets an audit log by its id.
    `ReadQuery<Region>` | `getGetRegionQuery(Id<Region,UUID> id)` Creates a query that gets a region by its id.
    `ReadQuery<SystemInformation>` | `getGetSystemInformationQuery(Id<SystemInformation,UUID> id)` Creates a query that gets a system by its id.
    `ReadQuery<Page<Alert>>` | `getPageAlertsQuery(AlertFilter filter, SortSpecification<AlertSortAttribute> sortSpecification, PageRequest pageRequest)` Creates a query that will find Alerts based on the supplied query criteria.
    `ReadQuery<Page<AuditLogEntry>>` | `getPageAuditLogQuery(AuditLogFilter filter, SortSpecification<AuditLogSortAttribute> sortSpecification, PageRequest pageRequest)` Creates a query that will produce a page of AuditLogEntry data based on the supplied filter and sorting criteria.
    `WriteQuery<Long>` | `getTrimAlertQuery(AlertFilter alertFilter)` Creates a write query to trim (delete) alerts based on the given filter.
    `WriteQuery<Long>` | `getTrimAuditLogQuery(AuditLogFilter filter)` Creates a write query to trim (delete) AuditLogEntry objects based on the given filter.
    `WriteQuery<Long>` | `getUpdateAlertListQuery(List<String> uids, String sysId, boolean state)` Creates a query to update a supplied list of alerts.
    `WriteQuery<Alert>` | `getUpdateAlertStateQuery(Alert alert)` Creates a write query to alter the state of an alert.
    `WriteQuery<AlertTopicListener>` | `getUpdateAlertTopicListenerQuery(AlertTopicListener atl)` Creates a write query to update an alert topic listener.
    `WriteQuery<LicenseKey>` | `getUpdateLicenseQuery(LicenseKey licenseKey)` Creates a query to update a license in the database.
    `WriteQuery<Region>` | `getUpdateRegionQuery(Region region)` Creates a write query to update a region.
    `WriteQuery<SystemInformation>` | `getUpdateSystemInformationQuery(SystemInformation systemInformation)` Creates a query to update a system in the database.

- - ### Method Detail

    - #### getGetAlertQuery

          ReadQuery<Alert> getGetAlertQuery(Id<Alert,UUID> id)

      Creates a query that gets an alert by its id.
      Parameters:
        `id` - id of the alert to get
      Returns:
        a read query.

    - #### getFindAlertsQuery

          ReadQuery<List<Alert>> getFindAlertsQuery(AlertFilter filter,
                                                  SortSpecification<AlertSortAttribute> sortSpecification)

      Creates a query that will find Alerts based on the supplied query criteria.
      Parameters:
        `filter` - specifies desired filtering on the returned Alerts
        `sortSpecification` - defines how the resulting data should be sorted
      Returns:
        A persistence layer Read operation that will produce a list of Alert objects based on the supplied filter criteria and sorted in the desired manner.

    - #### getPageAlertsQuery

          ReadQuery<Page<Alert>> getPageAlertsQuery(AlertFilter filter,
                                                  SortSpecification<AlertSortAttribute> sortSpecification,
                                                  PageRequest pageRequest)

      Creates a query that will find Alerts based on the supplied query criteria.
      Parameters:
        `filter` - specifies desired filtering on the returned Alerts
        `sortSpecification` - defines how the resulting data should be sorted
        `pageRequest` - definition for the desired page
      Returns:
        A persistence layer Read operation that will produce a list of Alert objects based on the supplied filter criteria and sorted in the desired manner.

    - #### getAddAlertQuery

          WriteQuery<Boolean> getAddAlertQuery(Alert alert)

      Creates a write query to add a new Alert to the system.
      Parameters:
        `alert` - the Alert to be added
      Returns:
        A persistence layer Write operation that will store an Alert object in the data store. The provided Alert object is returned but now backed by a database representation

    - #### getUpdateAlertStateQuery

          WriteQuery<Alert> getUpdateAlertStateQuery(Alert alert)

      Creates a write query to alter the state of an alert.
      Parameters:
        `alert` - the alert object with the updated state information
      Returns:
        a persistence layer Write operation that will alter the state for the alert found based on the external identification

    - #### getTrimAlertQuery

          WriteQuery<Long> getTrimAlertQuery(AlertFilter alertFilter)

      Creates a write query to trim (delete) alerts based on the given filter.
      Parameters:
        `alertFilter` - desired time stamp to remove alerts older than
      Returns:
        a persistence layer Write operation that may remove some alerts older than the time stamp filter

    - #### getAddAlertListQuery

          WriteQuery<Long> getAddAlertListQuery(List<Alert> alerts)

      Creates a write query to add a list of alerts to the persistence.
      Parameters:
        `alerts` - the list of alerts to add
      Returns:
        the count of alerts successfully added

    - #### getUpdateAlertListQuery

          WriteQuery<Long> getUpdateAlertListQuery(List<String> uids,
                                                 String sysId,
                                                 boolean state)

      Creates a query to update a supplied list of alerts.
      Parameters:
        `uids` - the unique identifications of each alert to be updated
        `sysId` - the system identification shared by the alerts to be updated
        `state` - the state of all the alerts to be updated
      Returns:
        the count of alerts successfully updated

    - #### getDeleteAlertListQuery

          WriteQuery<Long> getDeleteAlertListQuery(List<String> uids,
                                                 String sysId)

      Creates a query to delete a list of alerts.
      Parameters:
        `uids` - the unique identifications of each alert to be deleted
        `sysId` - the system identification shared by the alerts to be deleted
      Returns:
        the count of alerts successfully deleted

    - #### getCountAlertQuery

          ReadQuery<Long> getCountAlertQuery()

      Creates a query to retrieve the count of alerts in persistence.
      Returns:
        the query to count alerts

    - #### getGetAuditLogQuery

          ReadQuery<AuditLogEntry> getGetAuditLogQuery(Id<AuditLogEntry,UUID> id)

      Creates a query that gets an audit log by its id.
      Parameters:
        `id` - id of the audit log to get
      Returns:
        a read query.

    - #### getFindAuditLogQuery

          ReadQuery<List<AuditLogEntry>> getFindAuditLogQuery(AuditLogFilter filter,
                                                            SortSpecification<AuditLogSortAttribute> sortSpecification)

      Creates a query that will find AuditLogEntry objects based on the supplied query criteria.
      Parameters:
        `filter` - specifies desired filtering on the returned AuditLogs
        `sortSpecification` - defines how the resulting data should be sorted
      Returns:
        A persistence layer Read operation that will produce a list of AuditLogEntry objects based on the supplied filter criteria and sorted in the desired manner.

    - #### getPageAuditLogQuery

          ReadQuery<Page<AuditLogEntry>> getPageAuditLogQuery(AuditLogFilter filter,
                                                            SortSpecification<AuditLogSortAttribute> sortSpecification,
                                                            PageRequest pageRequest)

      Creates a query that will produce a page of AuditLogEntry data based on the supplied filter and sorting criteria.
      Parameters:
        `filter` - specifies desired filtering on the returned AuditLogs
        `sortSpecification` - defines how the resulting data should be sorted
        `pageRequest` - definition for the desired page
      Returns:
        A persistence layer Read operation that will produce a list of AuditLogEntry objects based on the supplied filter criteria and sorted in the desired manner.

    - #### getAddAuditLogEntryQuery

          WriteQuery<Boolean> getAddAuditLogEntryQuery(AuditLogEntry log)

      Creates a write query to add a new AuditLogEntry to the system.
      Parameters:
        `log` - The AuditLogEntry to be added
      Returns:
        A persistence layer Write operation that will store an AuditLogEntry object in the data store. The provided AuditLogEntry object is returned but now backed by a database representation

    - #### getCountAuditLogEntryQuery

          ReadQuery<Long> getCountAuditLogEntryQuery(AuditLogFilter filter)

      Creates a query to retrieve the count of AuditLogEntry objects based on the supplied filter.
      Parameters:
        `filter` - specifies desired filtering on the returned count of AuditLogEntry objects
      Returns:
        a persistence layer Read operation that will produce a total count of AuditLogEntry objects based on the desired filtering

    - #### getTrimAuditLogQuery

          WriteQuery<Long> getTrimAuditLogQuery(AuditLogFilter filter)

      Creates a write query to trim (delete) AuditLogEntry objects based on the given filter.
      Parameters:
        `filter` - specifies criteria that the AuditLogEntry objects must match to be eligible for removal
      Returns:
        a persistence layer Write operation that will remove AuditLogEntry objects based on the supplied filter criteria

    - #### getAddAuditLogEntryListQuery

          WriteQuery<Long> getAddAuditLogEntryListQuery(List<AuditLogEntry> auditLogs)

      Creates a write query to add a list of AuditLogEntry objects to the persistence data store.
      Parameters:
        `auditLogs` - the list of auditLogEntry objects to add
      Returns:
        the count of AuditLogEntry objects successfully added

    - #### getGetSystemInformationQuery

          ReadQuery<SystemInformation> getGetSystemInformationQuery(Id<SystemInformation,UUID> id)

      Creates a query that gets a system by its id.
      Parameters:
        `id` - id of the system to get
      Returns:
        a read query.

    - #### getAddSystemInformationQuery

          WriteQuery<Boolean> getAddSystemInformationQuery(SystemInformation systemInformation)

      Creates a query to add a system information.
      Parameters:
        `systemInformation` - system to add.
      Returns:
        the query to persist the given system.

    - #### getUpdateSystemInformationQuery

          WriteQuery<SystemInformation> getUpdateSystemInformationQuery(SystemInformation systemInformation)

      Creates a query to update a system in the database.
      Parameters:
        `systemInformation` - system information with the data to update.
      Returns:
        the query to update the given system in the database.

    - #### getDeleteSystemsQuery

          WriteQuery<Long> getDeleteSystemsQuery(SystemInformationFilter filter)

      Creates a query to delete systems from the database.
      Parameters:
        `filter` - filter to apply.
      Returns:
        the query to delete from the database the system matching the filter.

    - #### getFindSystemsQuery

          ReadQuery<List<SystemInformation>> getFindSystemsQuery(SystemInformationFilter filter,
                                                               SortSpecification<SystemInformationSortAttribute> sortSpecification)

      Creates a query to find systems in the database.
      Parameters:
        `filter` - filter to apply.
        `sortSpecification` - sort specification.
      Returns:
        the query to retrieve systems from the database.

    - #### getDeleteSystemInformationQuery

          WriteQuery<Void> getDeleteSystemInformationQuery(Id<SystemInformation,UUID> id)

      Creates a query that deletes a system.
      Parameters:
        `id` - id of the system to delete
      Returns:
        a write query

    - #### getGetAlertTopicListenerQuery

          ReadQuery<AlertTopicListener> getGetAlertTopicListenerQuery(Id<AlertTopicListener,UUID> id)

      Creates a query that gets an alert topic listener by its id.
      Parameters:
        `id` - id of the alert topic listener to get
      Returns:
        a read query.

    - #### getFindAlertTopicListenersQuery

          ReadQuery<List<AlertTopicListener>> getFindAlertTopicListenersQuery()

      Creates a query that will find all Alert Topic Listeners.
      Returns:
        A persistence layer Read operation.

    - #### getAddAlertTopicListenerQuery

          WriteQuery<AlertTopicListener> getAddAlertTopicListenerQuery(AlertTopicListener atl)

      Creates a write query to add a new Alert Topic Listener to the system.
      Parameters:
        `atl` - the Alert Topic Listener to be added
      Returns:
        A persistence layer Write operation

    - #### getUpdateAlertTopicListenerQuery

          WriteQuery<AlertTopicListener> getUpdateAlertTopicListenerQuery(AlertTopicListener atl)

      Creates a write query to update an alert topic listener.
      Parameters:
        `atl` - the alert topic listener with the updated state
      Returns:
        a persistence layer Write operation

    - #### getDeleteAlertTopicListenerQuery

          WriteQuery<Void> getDeleteAlertTopicListenerQuery(AlertTopicListener atl)

      Creates a delete query to remove an alert topic listener.
      Parameters:
        `atl` - the alert topic listener with the updated state
      Returns:
        a persistence layer Delete operation

    - #### getAddLicInstallIdQuery

          WriteQuery<LicInstallId> getAddLicInstallIdQuery(LicInstallId licInstallId)

      Creates a write query to add a new license install id.
      Parameters:
        `licInstallId` - license install id to add.
      Returns:
        the created license install id.

    - #### getDeleteLicInstallIdQuery

          WriteQuery<Void> getDeleteLicInstallIdQuery(LicInstallId licInstallId)

      Creates a query to delete install id the database.
      Parameters:
        `licInstallId` - the install id needs to be deleted.
      Returns:
        the query to delete the given install id in the database.

    - #### getFindLicInstallIdsQuery

          ReadQuery<List<LicInstallId>> getFindLicInstallIdsQuery()

      Creates a find query that will find all LicInstallId objects.
      Returns:
        the list of LicInstallId objects.

    - #### getAddLicenseQuery

          WriteQuery<LicenseKey> getAddLicenseQuery(LicenseKey licenseKey)

      Creates a write query to add a new license.
      Parameters:
        `licenseKey` - license to add.
      Returns:
        the created license.

    - #### getFindLicensesQuery

          ReadQuery<List<LicenseKey>> getFindLicensesQuery()

      Creates a find query that will find all LicenseKey objects.
      Returns:
        the list of LicenseKey objects.

    - #### getUpdateLicenseQuery

          WriteQuery<LicenseKey> getUpdateLicenseQuery(LicenseKey licenseKey)

      Creates a query to update a license in the database.
      Parameters:
        `licenseKey` - the license key that needs to be updated.
      Returns:
        the query to update the given license in the database.

    - #### getDeleteLicenseQuery

          WriteQuery<Void> getDeleteLicenseQuery(LicenseKey licenseKey)

      Creates a delete query to remove a license.
      Parameters:
        `licenseKey` - the license to be deleted
      Returns:
        a persistence layer Delete operation

    - #### getGetRegionQuery

          ReadQuery<Region> getGetRegionQuery(Id<Region,UUID> id)

      Creates a query that gets a region by its id.
      Parameters:
        `id` - id of the region to get
      Returns:
        a read query.

    - #### getFindRegionsQuery

          ReadQuery<List<Region>> getFindRegionsQuery()

      Creates a query that will find all regions.
      Returns:
        A persistence layer Read operation.

    - #### getAddRegionQuery

          WriteQuery<Region> getAddRegionQuery(Region region)

      Creates a write query to add a new Region to the system.
      Parameters:
        `region` - the region to be added
      Returns:
        A persistence layer Write operation

    - #### getUpdateRegionQuery

          WriteQuery<Region> getUpdateRegionQuery(Region region)

      Creates a write query to update a region.
      Parameters:
        `region` - the region with the updated state
      Returns:
        a persistence layer Write operation

    - #### getDeleteRegionQuery

          WriteQuery<Void> getDeleteRegionQuery(Region region)

      Creates a delete query to remove a region.
      Parameters:
        `region` - the region with the updated state
      Returns:
        a persistence layer Delete operation

    - #### getFindCtlAddrManagerQuery

          ReadQuery<Page<CtlAddrEntity>> getFindCtlAddrManagerQuery(CtlAddrManagerFilter filter,
                                                                  SortSpecification<CtlAddrManagerSortAttribute> sortSpec,
                                                                  PageRequest pageRequest)

    - #### getAddCtlAddrManagerQuery

          WriteQuery<CtlAddrEntity> getAddCtlAddrManagerQuery(CtlAddrEntity ctlAddrManager)

    - #### getDeleteCtlAddrManagerQuery

          WriteQuery<Long> getDeleteCtlAddrManagerQuery(CtlAddrManagerFilter filter)

    - #### getFindHostManageruery

          ReadQuery<Page<HostEntity>> getFindHostManageruery(HostManagerFilter filter,
                                                           SortSpecification<HostManagerSortAttribute> sortSpec,
                                                           PageRequest pageRequest)

    - #### getAddHostManagerQuery

          WriteQuery<HostEntity> getAddHostManagerQuery(HostEntity hostManager)

    - #### getDeleteHostManagerQuery

          WriteQuery<Long> getDeleteHostManagerQuery(HostManagerFilter filter)

Copyright © 2014. All Rights Reserved.