001 /*
002 * Sonar, open source software quality management tool.
003 * Copyright (C) 2008-2012 SonarSource
004 * mailto:contact AT sonarsource DOT com
005 *
006 * Sonar is free software; you can redistribute it and/or
007 * modify it under the terms of the GNU Lesser General Public
008 * License as published by the Free Software Foundation; either
009 * version 3 of the License, or (at your option) any later version.
010 *
011 * Sonar is distributed in the hope that it will be useful,
012 * but WITHOUT ANY WARRANTY; without even the implied warranty of
013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
014 * Lesser General Public License for more details.
015 *
016 * You should have received a copy of the GNU Lesser General Public
017 * License along with Sonar; if not, write to the Free Software
018 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
019 */
020 package org.sonar.core.persistence;
021
022 /**
023 * @since 2.13
024 */
025 public final class DatabaseUtils {
026 /**
027 * Oracle: number of elements in IN statements is limited.
028 */
029 public static final int MAX_IN_ELEMENTS = 1000;
030
031 private DatabaseUtils() {
032 }
033
034 /**
035 * List of all the tables.
036 * This list is hardcoded because we didn't succeed in using java.sql.DatabaseMetaData#getTables() in the same way
037 * for all the supported databases, particularly due to Oracle results.
038 */
039 static final String[] TABLE_NAMES = {
040 "action_plans",
041 "action_plans_reviews",
042 "active_dashboards",
043 "active_filters",
044 "active_rules",
045 "active_rule_changes",
046 "active_rule_parameters",
047 "active_rule_param_changes",
048 "alerts",
049 "authors",
050 "characteristics",
051 "characteristic_edges",
052 "characteristic_properties",
053 "criteria",
054 "dashboards",
055 "dependencies",
056 "duplications_index",
057 "events",
058 "filters",
059 "filter_columns",
060 "groups",
061 "groups_users",
062 "group_roles",
063 "loaded_templates",
064 "manual_measures",
065 "measure_data",
066 "metrics",
067 "notifications",
068 "projects",
069 "project_links",
070 "project_measures",
071 "properties",
072 "quality_models",
073 "resource_index",
074 "reviews",
075 "review_comments",
076 "rules",
077 "rules_parameters",
078 "rules_profiles",
079 "rule_failures",
080 "schema_migrations",
081 "snapshots",
082 "snapshot_sources",
083 "users",
084 "user_roles",
085 "widgets",
086 "widget_properties"};
087 }