Package org.firebirdsql.jdbc
Enum Class QuoteStrategy
- All Implemented Interfaces:
Serializable,Comparable<QuoteStrategy>,Constable
Strategy for quoting objects (or no quoting in the case of dialect 1).
- Since:
- 2.2
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionabstract StringBuilderappendQuoted(String objectName, StringBuilder sb) Appends theobjectNamewith (or in the case of dialect 1: without) quotes tosb.static QuoteStrategyforDialect(int dialect) Obtain theQuoteStrategyfor the specified dialect.abstract StringquoteObjectName(String objectName) Returns the object name appropriately quoted according to this quote strategy.static QuoteStrategyReturns the enum constant of this class with the specified name.static QuoteStrategy[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NO_QUOTES
Dialect 1 doesn't support quoting of object names. -
QUOTES
Dialect 3 (and 2) supports quoting of object names.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
appendQuoted
Appends theobjectNamewith (or in the case of dialect 1: without) quotes tosb.- Parameters:
objectName- The object name to appendsb- StringBuilder for appending- Returns:
- The StringBuilder for method chaining
-
quoteObjectName
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
Obtain theQuoteStrategyfor the specified dialect.- Parameters:
dialect- Dialect- Returns:
- Appropriate
QuoteStrategy
-