Package io.trino.spi.session
Class PropertyMetadata<T>
java.lang.Object
io.trino.spi.session.PropertyMetadata<T>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PropertyMetadata<Boolean>booleanProperty(String name, String description, Boolean defaultValue, boolean hidden) static PropertyMetadata<Boolean>booleanProperty(String name, String description, Boolean defaultValue, Consumer<Boolean> validation, boolean hidden) Decodes the SQL type object value to the Java type of the property.static PropertyMetadata<Double>doubleProperty(String name, String description, Double defaultValue, boolean hidden) static PropertyMetadata<Double>doubleProperty(String name, String description, Double defaultValue, Consumer<Double> validation, boolean hidden) Encodes the Java type value to SQL type object valuestatic <T extends Enum<T>>
PropertyMetadata<T>enumProperty(String name, String descriptionPrefix, Class<T> type, T defaultValue, boolean hidden) static <T extends Enum<T>>
PropertyMetadata<T>enumProperty(String name, String descriptionPrefix, Class<T> type, T defaultValue, Consumer<T> validation, boolean hidden) Gets the default value for this property.Description for the end user.Java type of this property.getName()Name of the property.SQL type of the property.static PropertyMetadata<Integer>integerProperty(String name, String description, Integer defaultValue, boolean hidden) static PropertyMetadata<Integer>integerProperty(String name, String description, Integer defaultValue, Consumer<Integer> validation, boolean hidden) booleanisHidden()Is this property hidden from users?static PropertyMetadata<Long>longProperty(String name, String description, Long defaultValue, boolean hidden) static PropertyMetadata<Long>longProperty(String name, String description, Long defaultValue, Consumer<Long> validation, boolean hidden) static PropertyMetadata<String>stringProperty(String name, String description, String defaultValue, boolean hidden) static PropertyMetadata<String>stringProperty(String name, String description, String defaultValue, Consumer<String> validation, boolean hidden) toString()
-
Constructor Details
-
PropertyMetadata
-
-
Method Details
-
getName
Name of the property. This must be a valid identifier. -
getDescription
Description for the end user. -
getSqlType
SQL type of the property. -
getJavaType
Java type of this property. -
getDefaultValue
Gets the default value for this property. -
isHidden
public boolean isHidden()Is this property hidden from users? -
decode
Decodes the SQL type object value to the Java type of the property. -
encode
Encodes the Java type value to SQL type object value -
toString
-
booleanProperty
public static PropertyMetadata<Boolean> booleanProperty(String name, String description, Boolean defaultValue, boolean hidden) -
booleanProperty
-
integerProperty
public static PropertyMetadata<Integer> integerProperty(String name, String description, Integer defaultValue, boolean hidden) -
integerProperty
-
longProperty
public static PropertyMetadata<Long> longProperty(String name, String description, Long defaultValue, boolean hidden) -
longProperty
-
doubleProperty
public static PropertyMetadata<Double> doubleProperty(String name, String description, Double defaultValue, boolean hidden) -
doubleProperty
-
stringProperty
public static PropertyMetadata<String> stringProperty(String name, String description, String defaultValue, boolean hidden) -
stringProperty
-
enumProperty
public static <T extends Enum<T>> PropertyMetadata<T> enumProperty(String name, String descriptionPrefix, Class<T> type, T defaultValue, boolean hidden) -
enumProperty
-