/*
 * Copyright 2014 Codenvy, S.A.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.codenvy.ide.ext.datasource.shared;

/**
 * Explore mode, to tell which table types are returned.
 * 
 * @author "Mickaël Leduque"
 */
public enum ExploreTableType {

    /** Explore simplest mode. Only tables and views. */
    SIMPLE,
    /** Default explore mode. Adds materialized views, alias and synonyms toSIMPLE. */
    STANDARD,
    /** Explore mode with STANDARD tables plus system tables and views. */
    SYSTEM,
    /** Explore mode for all table/entities types. */
    ALL
}

@@ -837,18 +837,21 @@
   SIMPLE
+(0)
 ,%0A
-
     /** 
@@ -941,16 +941,19 @@
 STANDARD
+(1)
 ,%0A    /*
@@ -1031,16 +1031,19 @@
   SYSTEM
+(2)
 ,%0A    /*
@@ -1094,14 +1094,709 @@
  */%0A
-
     ALL
+(3);%0A%0A    private final int index;%0A%0A    private ExploreTableType(final int index) %7B%0A        this.index = index;%0A    %7D%0A%0A    /**%0A     * Returns the index of the enum.%0A     * %0A     * @return the index%0A     */%0A    public int getIndex() %7B%0A        return this.index;%0A    %7D%0A%0A    /**%0A     * Retrieve the enum value that has this index.%0A     * %0A     * @param searchedIndex the index%0A     * @return the enum value or null if there is none%0A     */%0A    public static ExploreTableType fromIndex(final int searchedIndex) %7B%0A        for (final ExploreTableType type : values()) %7B%0A            if (type.getIndex() == searchedIndex) %7B%0A                return type;%0A            %7D%0A        %7D%0A        return null;%0A    %7D
 %0A%7D%0A

Add index to table categories