Enum Class QuoteStrategy

java.lang.Object
java.lang.Enum<QuoteStrategy>
org.firebirdsql.jdbc.QuoteStrategy
All Implemented Interfaces:
Serializable, Comparable<QuoteStrategy>, Constable

public enum QuoteStrategy extends Enum<QuoteStrategy>
Strategy for quoting objects (or no quoting in the case of dialect 1).
Since:
2.2
  • Enum Constant Details

    • NO_QUOTES

      public static final QuoteStrategy NO_QUOTES
      Dialect 1 doesn't support quoting of object names.
    • QUOTES

      public static final QuoteStrategy QUOTES
      Dialect 3 (and 2) supports quoting of object names.
  • Method Details

    • values

      public static QuoteStrategy[] 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 QuoteStrategy 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
    • appendQuoted

      public abstract StringBuilder appendQuoted(String objectName, StringBuilder sb)
      Appends the objectName with (or in the case of dialect 1: without) quotes to sb.
      Parameters:
      objectName - The object name to append
      sb - StringBuilder for appending
      Returns:
      The StringBuilder for method chaining
    • quoteObjectName

      public abstract String quoteObjectName(String objectName)
      Returns the object name appropriately quoted according to this quote strategy.
      Parameters:
      objectName - The object name
      Returns:
      The transformed object name.
      Since:
      3.0.6
    • forDialect

      public static QuoteStrategy forDialect(int dialect)
      Obtain the QuoteStrategy for the specified dialect.
      Parameters:
      dialect - Dialect
      Returns:
      Appropriate QuoteStrategy