Enum QuoteStrategy

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<QuoteStrategy>

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

      Enum Constants 
      Enum Constant Description
      NO_QUOTES
      Dialect 1 doesn't support quoting of object names.
      QUOTES
      Dialect 3 (and 2) supports quoting of object names.
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract java.lang.StringBuilder appendQuoted​(java.lang.String objectName, java.lang.StringBuilder sb)
      Appends the objectName with (or in the case of dialect 1: without) quotes to sb.
      static QuoteStrategy forDialect​(int dialect)
      Obtain the QuoteStrategy for the specified dialect.
      abstract java.lang.String quoteObjectName​(java.lang.String objectName)
      Returns the object name appropriately quoted according to this quote strategy.
      static QuoteStrategy valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static QuoteStrategy[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • 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 Detail

      • values

        public static QuoteStrategy[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (QuoteStrategy c : QuoteStrategy.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static QuoteStrategy valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • appendQuoted

        public abstract java.lang.StringBuilder appendQuoted​(java.lang.String objectName,
                                                             java.lang.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 java.lang.String quoteObjectName​(java.lang.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