Enum Class InlineViewStyle

java.lang.Object
java.lang.Enum<InlineViewStyle>
net.sf.jailer.database.InlineViewStyle
All Implemented Interfaces:
Serializable, Comparable<InlineViewStyle>, Constable

public enum InlineViewStyle extends Enum<InlineViewStyle>
Styles of inline-views for different DBMS'es.
  • Enum Constant Details

  • Field Details

    • example

      public final String example
  • Method Details

    • values

      public static InlineViewStyle[] 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 InlineViewStyle 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
    • forSession

      public static InlineViewStyle forSession(Session session)
      Gets a suitable inline-view style for a session.
      Parameters:
      session - the database session
      Returns:
      a suitable InlineViewStyle for the given session
    • head

      public abstract String head(String[] columnNames) throws SQLException
      Returns the SQL head (opening) of the inline view.
      Parameters:
      columnNames - the column names of the inline view
      Returns:
      the head SQL fragment
      Throws:
      SQLException
    • item

      public abstract String item(String[] values, String[] columnNames, int rowNumber) throws SQLException
      Returns the SQL fragment for a single row of the inline view.
      Parameters:
      values - the SQL literal values for the row
      columnNames - the column names of the inline view
      rowNumber - zero-based index of the row (first row may need column aliases)
      Returns:
      the SQL fragment for the row
      Throws:
      SQLException
    • separator

      public abstract String separator() throws SQLException
      Returns the SQL separator between row items.
      Returns:
      the separator SQL fragment
      Throws:
      SQLException
    • terminator

      public abstract String terminator(String name, String[] columnNames) throws SQLException
      Returns the SQL terminator (closing) of the inline view.
      Parameters:
      name - the alias name of the inline view
      columnNames - the column names of the inline view
      Returns:
      the terminator SQL fragment
      Throws:
      SQLException