Enum Class JdbcDatabaseType

java.lang.Object
java.lang.Enum<JdbcDatabaseType>
edu.internet2.middleware.subject.provider.JdbcDatabaseType
All Implemented Interfaces:
Serializable, Comparable<JdbcDatabaseType>, Constable

public enum JdbcDatabaseType extends Enum<JdbcDatabaseType>
type of database we are connecting to
  • Enum Constant Details

  • Method Details

    • values

      public static JdbcDatabaseType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static JdbcDatabaseType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • resolveDatabaseType

      public static JdbcDatabaseType resolveDatabaseType(Connection connection)
      return the database type for this connection or null
      Parameters:
      connection -
      Returns:
      the database type
    • columnAliases

      public static List<String> columnAliases(String fromClause)
      get the column aliases from a query select a,b,c from
      Parameters:
      fromClause -
      Returns:
      the aliases
    • selectPart

      public static String selectPart(String query)
      get the select part from a query
      Parameters:
      query -
      Returns:
      the select part, everything up to the from, or null if cant find
    • pageQuery

      public abstract String pageQuery(String query, int pageSize)
      change a query into a paging query
      Parameters:
      query -
      pageSize -
      Returns:
      the new query
    • matchesUrlDefinitely

      public abstract boolean matchesUrlDefinitely(String url)
      Parameters:
      url -
      Returns:
      true if this is definitely this db type
    • matchesUrlMaybe

      public abstract boolean matchesUrlMaybe(String url)
      Parameters:
      url -
      Returns:
      true if this is maybe this db type
    • valueOfIgnoreCase

      public static JdbcDatabaseType valueOfIgnoreCase(String string, boolean exceptionOnNull)
      do a case-insensitive matching
      Parameters:
      string -
      exceptionOnNull - will not allow null or blank entries
      Returns:
      the enum or null or exception if not found