001/*
002 * Copyright 2013 Global Biodiversity Information Facility (GBIF)
003 * Licensed under the Apache License, Version 2.0 (the "License");
004 * you may not use this file except in compliance with the License.
005 * You may obtain a copy of the License at
006 * http://www.apache.org/licenses/LICENSE-2.0
007 * Unless required by applicable law or agreed to in writing, software
008 * distributed under the License is distributed on an "AS IS" BASIS,
009 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
010 * See the License for the specific language governing permissions and
011 * limitations under the License.
012 */
013package org.gbif.registry.persistence.mapper;
014
015import org.gbif.api.model.common.paging.Pageable;
016import org.gbif.api.model.registry.Installation;
017
018import java.util.List;
019import java.util.UUID;
020import javax.annotation.Nullable;
021
022import org.apache.ibatis.annotations.Param;
023
024public interface InstallationMapper extends BaseNetworkEntityMapper<Installation> {
025
026  long countInstallationsEndorsedBy(@Param("nodeKey") UUID nodeKey);
027
028  List<Installation>
029    listInstallationsEndorsedBy(@Param("nodeKey") UUID nodeKey, @Nullable @Param("page") Pageable page);
030
031  long countInstallationsByOrganization(@Param("organizationKey") UUID organizationKey);
032
033  List<Installation> listInstallationsByOrganization(@Param("organizationKey") UUID organizationKey,
034    @Nullable @Param("page") Pageable page);
035
036  List<Installation> deleted(@Nullable @Param("page") Pageable page);
037
038  long countDeleted();
039
040  long countNonPublishing();
041
042  List<Installation> nonPublishing(@Nullable @Param("page") Pageable page);
043
044}