public final class PropertyMetadata<T> extends Object
| Constructor and Description |
|---|
PropertyMetadata(String name,
String description,
Type sqlType,
Class<T> javaType,
T defaultValue,
boolean hidden,
Function<Object,T> decoder,
Function<T,Object> encoder) |
| Modifier and Type | Method and Description |
|---|---|
static PropertyMetadata<Boolean> |
booleanProperty(String name,
String description,
Boolean defaultValue,
boolean hidden) |
static PropertyMetadata<io.airlift.units.DataSize> |
dataSizeProperty(String name,
String description,
io.airlift.units.DataSize defaultValue,
boolean hidden) |
T |
decode(Object value)
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) |
Object |
encode(T value)
Encodes the Java type value to SQL type object value
|
T |
getDefaultValue()
Gets the default value for this property.
|
String |
getDescription()
Description for the end user.
|
Class<T> |
getJavaType()
Java type of this property.
|
String |
getName()
Name of the property.
|
Type |
getSqlType()
SQL type of the property.
|
static PropertyMetadata<Integer> |
integerProperty(String name,
String description,
Integer defaultValue,
boolean hidden) |
boolean |
isHidden()
Is this property hidden from users?
|
static PropertyMetadata<Long> |
longProperty(String name,
String description,
Long defaultValue,
boolean hidden) |
static PropertyMetadata<String> |
stringProperty(String name,
String description,
String defaultValue,
boolean hidden) |
public String getName()
public String getDescription()
public Type getSqlType()
public T getDefaultValue()
public boolean isHidden()
public T decode(Object value)
public static PropertyMetadata<Boolean> booleanProperty(String name, String description, Boolean defaultValue, boolean hidden)
public static PropertyMetadata<Integer> integerProperty(String name, String description, Integer defaultValue, boolean hidden)
public static PropertyMetadata<Long> longProperty(String name, String description, Long defaultValue, boolean hidden)
public static PropertyMetadata<Double> doubleProperty(String name, String description, Double defaultValue, boolean hidden)
public static PropertyMetadata<String> stringProperty(String name, String description, String defaultValue, boolean hidden)
public static PropertyMetadata<io.airlift.units.DataSize> dataSizeProperty(String name, String description, io.airlift.units.DataSize defaultValue, boolean hidden)
Copyright © 2012–2022. All rights reserved.