Package org.apache.calcite.avatica
Enum InternalProperty
- java.lang.Object
-
- java.lang.Enum<InternalProperty>
-
- org.apache.calcite.avatica.InternalProperty
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<InternalProperty>
public enum InternalProperty extends java.lang.Enum<InternalProperty>
Definitions of properties that drive the behavior ofAvaticaDatabaseMetaData.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classInternalProperty.NullSortingWhere nulls appear in a sorted relation.
-
Enum Constant Summary
Enum Constants Enum Constant Description CASE_SENSITIVEWhether identifiers are matched case-sensitively.NULL_SORTINGHow identifiers are stored if they are not quoted.QUOTED_CASINGHow identifiers are stored if they are quoted.QUOTINGHow identifiers are quoted.SQL_KEYWORDSCharacter that quotes identifiers.UNQUOTED_CASINGHow identifiers are stored if they are not quoted.
-
Field Summary
Fields Modifier and Type Field Description private java.lang.ObjectdefaultValueprivate java.lang.ClassenumClassprivate ConnectionProperty.Typetype
-
Constructor Summary
Constructors Modifier Constructor Description privateInternalProperty(java.lang.Class<E> enumClass, E defaultValue)Creates an InternalProperty based on an enum.privateInternalProperty(ConnectionProperty.Type type, java.lang.Class enumClass, java.lang.Object defaultValue)privateInternalProperty(ConnectionProperty.Type type, java.lang.Object defaultValue)Creates an InternalProperty based on a non-enum type.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private <T> Tget_(java.util.Map<InternalProperty,java.lang.Object> map, T defaultValue)booleangetBoolean(java.util.Map<InternalProperty,java.lang.Object> map)Returns the boolean value of this property.<E extends java.lang.Enum>
EgetEnum(java.util.Map<InternalProperty,java.lang.Object> map, java.lang.Class<E> enumClass)Returns the enum value of this property.java.lang.StringgetString(java.util.Map<InternalProperty,java.lang.Object> map)Returns the string value of this property, or null if not specified and no default.static InternalPropertyvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static InternalProperty[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
CASE_SENSITIVE
public static final InternalProperty CASE_SENSITIVE
Whether identifiers are matched case-sensitively.
-
SQL_KEYWORDS
public static final InternalProperty SQL_KEYWORDS
Character that quotes identifiers.
-
QUOTING
public static final InternalProperty QUOTING
How identifiers are quoted.
-
QUOTED_CASING
public static final InternalProperty QUOTED_CASING
How identifiers are stored if they are quoted.
-
UNQUOTED_CASING
public static final InternalProperty UNQUOTED_CASING
How identifiers are stored if they are not quoted.
-
NULL_SORTING
public static final InternalProperty NULL_SORTING
How identifiers are stored if they are not quoted.
-
-
Field Detail
-
type
private final ConnectionProperty.Type type
-
enumClass
private final java.lang.Class enumClass
-
defaultValue
private final java.lang.Object defaultValue
-
-
Constructor Detail
-
InternalProperty
private InternalProperty(java.lang.Class<E> enumClass, E defaultValue)Creates an InternalProperty based on an enum.
-
InternalProperty
private InternalProperty(ConnectionProperty.Type type, java.lang.Object defaultValue)
Creates an InternalProperty based on a non-enum type.
-
InternalProperty
private InternalProperty(ConnectionProperty.Type type, java.lang.Class enumClass, java.lang.Object defaultValue)
-
-
Method Detail
-
values
public static InternalProperty[] 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 (InternalProperty c : InternalProperty.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static InternalProperty 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 namejava.lang.NullPointerException- if the argument is null
-
get_
private <T> T get_(java.util.Map<InternalProperty,java.lang.Object> map, T defaultValue)
-
getString
public java.lang.String getString(java.util.Map<InternalProperty,java.lang.Object> map)
Returns the string value of this property, or null if not specified and no default.
-
getBoolean
public boolean getBoolean(java.util.Map<InternalProperty,java.lang.Object> map)
Returns the boolean value of this property. Throws if not set and no default.
-
getEnum
public <E extends java.lang.Enum> E getEnum(java.util.Map<InternalProperty,java.lang.Object> map, java.lang.Class<E> enumClass)
Returns the enum value of this property. Throws if not set and no default.
-
-