All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.sonar.db.property.PropertiesMapper Maven / Gradle / Ivy

The newest version!
/*
 * SonarQube
 * Copyright (C) 2009-2018 SonarSource SA
 * mailto:info AT sonarsource DOT com
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 3 of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */
package org.sonar.db.property;

import java.util.List;
import java.util.Set;
import javax.annotation.Nullable;
import org.apache.ibatis.annotations.Param;

public interface PropertiesMapper {

  Set findUsersForNotification(@Param("notifKey") String notificationKey, @Nullable @Param("projectKey") String projectKey);

  List selectGlobalProperties();

  List selectProjectProperties(String resourceKey);

  PropertyDto selectByKey(PropertyDto key);

  List selectByKeys(@Param("keys") List keys);

  List selectByKeysAndComponentIds(@Param("keys") List keys, @Param("componentIds") List componentIds);

  List selectByComponentIds(@Param("componentIds") List componentIds);

  List selectByQuery(@Param("query") PropertyQuery query);

  List selectByKeyAndMatchingValue(@Param("key") String key, @Param("value") String value);

  List selectDescendantModuleProperties(@Param("moduleUuid") String moduleUuid, @Param(value = "scope") String scope,
    @Param(value = "excludeDisabled") boolean excludeDisabled);

  List selectIdsByOrganizationAndUser(@Param("organizationUuid") String organizationUuid, @Param("userId") int userId);

  List selectIdsByOrganizationAndMatchingLogin(@Param("organizationUuid") String organizationUuid, @Param("login") String login,
                                                     @Param("propertyKeys") List propertyKeys);

  List selectGlobalPropertiesByKeyQuery(@Param("textQuery") String textQuery);

  void insertAsEmpty(@Param("key") String key, @Nullable @Param("userId") Integer userId, @Nullable @Param("componentId") Long componentId,
    @Param("now") long now);

  void insertAsText(@Param("key") String key, @Nullable @Param("userId") Integer userId, @Nullable @Param("componentId") Long componentId,
    @Param("value") String value, @Param("now") long now);

  void insertAsClob(@Param("key") String key, @Nullable @Param("userId") Integer userId, @Nullable @Param("componentId") Long componentId,
    @Param("value") String value, @Param("now") long now);

  int delete(@Param("key") String key, @Nullable @Param("userId") Integer userId, @Nullable @Param("componentId") Long componentId);

  int deleteById(long id);

  int deleteProjectProperty(@Param("key") String key, @Param("rId") Long componentId);

  int deleteProjectProperties(@Param("key") String key, @Param("value") String value);

  int deleteGlobalProperty(@Param("key") String key);

  int deleteByQuery(@Param("query") PropertyQuery query);

  void deleteByIds(@Param("ids") List ids);

  void deleteByKeyAndValue(@Param("key") String key, @Param("value") String value);

  int renamePropertyKey(@Param("oldKey") String oldKey, @Param("newKey") String newKey);

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy